I'm working on a project that has a custom XML file in the res/values map.
It's not a deep XML:
<resources>
<accesspoint
...
Eclipse is generating an error: found tag accesspoint where item is expected
Now, I've googled this a bit and there are similar problems everywhere. But no solution. When I change them all to item and give them a name and a type, I still get an error on the closing tags that simply says "Orginally defind here".
I'm out of ideas here, does anyone know what this means? And how I fix it?
Something is a bit screwy in Eclipse. I had the same problem as you no matter what I renamed the tag.
Solution: delete the tag, and re-write it by hand (DON'T COPY/PASTE).
There must be some kind of strange hidden character that gets in there somehow, because just re-writing the EXACT same thing, and I now have no errors.
Right click on the xml file in the package explorer, then Source -> Format.
I know this is a 9 years old question. But I got the same error message today. My solution differs from the described answers. Changes in the - here - corresponding file accesspoints.xml
were necessary. My corresponding content was:
<resources>
<accesspoint name="btnOpen">false</accesspoint>
...
</resources>
This accesspoint
tag is to be replaced by the item
tag:
<resources>
<item type="accesspoint" name="btnOpen">false</item>
...
</resources>
Tried all of the above solutions. None of them worked. Found the problem in Eclipse:
Copy the xml file from res/values folder to res/xml folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With