Rohan Lekhwani
Rohan Lekhwani

Reputation: 500

Why am I getting this error (unknown tag <:color> )even when there's no such tag in the file?

Everything worked well before I copy-pasted some code from another project. It worked well in that project but here it started showing this error. Even my colors.xml file doesn't contain any such tag. The error and array.xml

The error and array.xml

color.xml

color.xml

Upvotes: 3

Views: 2235

Answers (2)

Afif Al Mamun
Afif Al Mamun

Reputation: 199

I know it's late to answer but what I worked for me is changing <string> tags into <item> under <string-array> element.

Upvotes: 0

Edward van Raak
Edward van Raak

Reputation: 4910

This is caused by a resource array not containing item

The error makes it very confusing :)

<string-array name="...">
        <string>...</string>
<string-array name="...">

This will result in: error: unknown tag <:string>.

Change to

<string-array name="...">
        <item>...</item>
<string-array name="...">

Upvotes: 12

Related Questions