Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in an XML file reported and aborting build

Tags:

android

When i edited the res/layout/main.xml and tried to re-run the application build. the following error message appears:

[2011-05-28 08:56:04 - MyWebApps1] res\layout\main.xml:0: error: Resource entry main is already defined.
[2011-05-28 08:56:04 - MyWebApps1] res\layout\main.out.xml:0: Originally defined here.
[2011-05-28 08:56:04 - MyWebApps1] C:\Users\Toshiba\Documents\android\MyWebApps1\res\layout\main.out.xml:1: error: Error parsing XML: no element found
[2011-05-28 08:56:07 - MyWebApps1] Error in an XML file: aborting build.

the main.xml file was edited correctly. No syntax error. Anyone has idea?

like image 752
Simon Wong Avatar asked Dec 09 '22 08:12

Simon Wong


2 Answers

You pressed F11 to run the app but while being on the main.xml and due to your Eclipse configuration it ran the xml file, generating the .out.xml. Just delete it.

like image 176
Franco Avatar answered Jan 03 '23 03:01

Franco


You need to delete the main.out.xml in your res/layout/ , and then clean your project.
If you work on Eclipse IDE , do like this : Project ==> Clean ==> check your project , and press OK.

like image 32
Houcine Avatar answered Jan 03 '23 02:01

Houcine