Android project won't build when editing a resource file

Viewed 38351

I have an Android 1.5 project in Eclipse and whenever I merely have an xml resource file open the build dies with an error. E.g. if I have the res\layout\main.xml open as the active document it won't build and throws the following error:

Error in an XML file: aborting build.
res\layout\main.xml:0: ERROR Resource entry main is already defined.

Then I have to delete main.out.xml and switch to any .java file in the project to get it to build.

Do I have something configured incorrectly or is this just an Eclipse or ADT bug? It drove me nuts for an hour before I figure out what the cause was.

8 Answers

I just had the same problem because I had two files of different type format, but with the same name, like: jquerymobile.css and jquerymobile.js

the solution was to rename one of the files

Related