Eclipse Development for the Android - Got Ya's!

2012-03-18 by

I kept getting this error when trying to run Google Android applications using Eclipse

 

 

Error in an XML file: aborting build.

res\layout\main.xml:0: error: Resource entry main is already defined.

res\layout\row.out.xml:0: Originally defined here.

%user profile%\workspace\%project Name%\res\layout\main.out.xml:1: error: Error parsing XML: no element found

Error in an XML file: aborting build.

 

 

To Fix this issue I was reading quite a bit of help online.  The best solution I have found up to this point is to make sure in the package explorer you are selected on the project not the actual file.  Then when you tell Eclipse to “Run” it will compile everything.  When you are selected on a specific file it tries to just compile that file (in this case an XML file) and it creates the .out.blah file and that causes issues.  If you have done this then you need to make sure in eclipse you first delete all of the .out files and in the project menu choose Clean, and clean the project.  Then if you select on the project in Package Explorer and click the “Run” button things should work for you.