3

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

2
  • Press Ctrl+Shift+F and search for <:color>. You will get location where this tag is present in your project.
    – Aditya
    Jan 17, 2018 at 18:17
  • Check the code you copy-pasted from another project - the error is probably there in one of the files under res/values/ directory (not necessarily colors.xml, it could be values.xml or styles.xml for example). Jan 17, 2018 at 18:38

2 Answers 2

12

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="...">
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.