• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps New Developer with a problem. PLEASE HELP

Cliff254

Lurker
Jan 8, 2010
2
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!!
 
Hello all!

[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!!

In the project explorer delete the main.out.xml

You attempted to "run" the xml file. You had it selected in the project/package explorer when you hit the run button.

Before you hit run, make sure you have either your main activity class or the top level project folder selected when you hit the run button.

happy coding.
 
  • Like
Reactions: wado1
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones