Khash Khash - 26 days ago 10
Android Question

Found text" " where item tag is expected

I added a colors.xml to my resources and wrote the following xml code :

<?xml version="1.0" encoding="UTF-8"?>
<resources>
<color name="white">#FFFFFF</color>
<color name="yellow">#FFFF00</color>
<color name="fuchsia">#FF00FF</color>
<color name="red">#FF0000</color>
<color name="silver">#C0C0C0</color>
<color name="gray">#808080</color>
<color name="olive">#808000</color>
<color name="purple">#800080</color>
<color name="maroon">#800000</color>
<color name="aqua">#00FFFF</color>
<color name="lime">#00FF00</color>
<color name="teal">#008080</color>
<color name="green">#008000</color>
<color name="blue">#0000FF</color>
<color name="navy">#000080</color>
<color name="black">#000000</color>
</resources>


I use AIDE on my mobile to develop, it throws an error:


Found text" " where item tag is expected


please advise
thanks

Answer

Looks like the 4 whitespace characters at the beginning of the file are the problem that you're running into.

Comments