Error In An Xml File Aborting Build. Main.out.xml
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error in an XML file: aborting build. on android [closed] up vote 3 down vote favorite 1 i have a problem when building android project. i build android project and i get an error. the error is : "Error in an XML file: aborting build.".i tried all solution. I deleted main.out.xml. After that, i cleaned up the project. But it didn't work There is no error in xml file I deleted bin folder. It worked at first. But when i change anything in xml file, i get same error My xml file is :
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it http://stackoverflow.com/questions/12796687/error-in-an-xml-file-aborting-build-on-android only takes a minute: Sign up Android, “Error in an XML file: aborting build.” up vote 3 down vote favorite I am coding an Android project and get the error: Error in an XML file: aborting build. This is the XML code referenced in the error:
notifications of new posts by email. Join 535 other followers Categories Android Development ASP.net Development C# CMS Computer Science e-commerce General Web Development Javascript JQuery https://mikeyhogarth.wordpress.com/2010/09/29/android-beginner-top-tip-dont-run-from-xml-files/ Just for Fun Opinion Personal php Project Euler Ruby Ruby on Rails http://androidforums.com/threads/new-developer-with-a-problem-please-help.34260/ Recent Posts Javascript - It's notshit! From Rails to Node.js -observations The stupidest thing I ever saw a developerdo Ruby's instance_exec method Ruby Gotcha: Setting default Date, Time andDateTime Posted on September 29, 2010October 27, 2010 Android Development Android Beginner Top Tip - How to fix the ‘main.out.xml' error in issue Okay if you're only just beginning Android development, and you're developing in Eclipse, you will almost certainly run into the following issue at some point. You've done ‘something' and now your project won't run and you can't fix it no matter what you do. The symptoms You run your application and a weird new file appears in your project explorer error in an called "main.out.xml". The application doesn't build, and on your "Problems" tab in eclipse you get one or more of the following messages; Premature end of file. main.out.xml Unparsed aapt error(s)! Check the console for output. Unknown Android Packaging Problem Your console has the following errors in it; Error in an XML file: aborting build. main.xml:0: error: Resource entry main is already defined. main.out.xml:0: Originally defined here. main.out.xml:1: error: Error parsing XML: no element found The cause You'll get yourself into this state if you attempt to run your code while you're editing an xml file which aapt uses to generate any source files. The solution If you find this page through googling, chances are you've been banging your head against the wall because now your project won't run at all whatever you do. The mistake you made here was to run while the xml file was open. You should only hit that button when a java source file is open. This won't help you much now though, as trying to run the project will present you with the following error in
Messages: 2 Likes Received: 0 Hello all! I am in the process of trying to become a new developer and have read some stuff from different java books and now am attempting to create my first program, my hello world in eclipse. The book i am now using to learn android programing is "Android Application Development" by Rogers, Lombardo, Mednieks & Meike published by O'Reilly, ISBN number: 978-0-596-52147-9. i have followed all of the steps in the book to create my hello world (i believe) and have done as follows: new android project project name:HelloWorld Application name: HelloWorld Package name: com.oreilly.helloworld Build Target: android 2.0 (i really dont know what to choose) I have not edited the helloworldactivity.java file (like the book tells me to) I have left the main.xml file as is aswell. In strings.xml i have edited the hello string to have a value of "Hello Android!" like the book told me to and it is reflected in the main.xml file by showing the little black screen that sais "Hello Android!" (like the book told me to) after i do this i go to run the file like the book tells me to by going to run -> run, and then selecting android application and clicking "ok" and it does not run and i get the error as follows: [2010-01-08 00:19:29 - HelloWorld]Error in an XML file: aborting build. [2010-01-08 00:19:29 - HelloWorld]res\layout\main.out.xml:0: error: Resource entry main is already defined. [2010-01-08 00:19:29 - HelloWorld]res\layout\main.out.out.xml:0: Originally defined here. [2010-01-08 00:19:29 - HelloWorld]res\layout\main.xml:0: error: Resource entry main is already defined. [2010-01-08 00:19:29 - HelloWorld]res\layout\main.out.out.xml:0: Originally defined here. [2010-01-08 00:19:29 - HelloWorld]C:\Users\Andrew\workspace\HelloWorld\res\layout\main.out.out.xml:1: error: Error parsing XML: no element found [2010-01-08 00:19:29 - HelloWorld]C:\Users\Andrew\workspace\HelloWorld\res\layout\main.out.xml:1: error: Error parsing XML: no element found I have NO IDEA what is wrong! can someone please help me out? I Desperately want to make Android Applications!! Advertisement Jan 8, 2010 #