New Developer with a problem. PLEASE HELP


Last Updated:

  1. Cliff254

    Cliff254 New Member This Topic's Starter

    Joined:
    Jan 8, 2010
    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
  2. eclipsed4utoo

    eclipsed4utoo Well-Known Member

    Joined:
    Nov 12, 2009
    Messages:
    435
    Likes Received:
    27
    open the "ma in.out.out.xml" and the "ma in.out.xml" files. If there are errors in those files, they will have red lines underneath them.
     
  3. KeithG

    KeithG Well-Known Member

    Joined:
    Nov 15, 2009
    Messages:
    103
    Likes Received:
    3
    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.
     
    wado1 likes this.
  4. Cliff254

    Cliff254 New Member This Topic's Starter

    Joined:
    Jan 8, 2010
    Messages:
    2
    Likes Received:
    0
    Keith, that worked perfectly! Thank you soo much!!
     
  5. phiredrop

    phiredrop New Member

    Joined:
    May 13, 2010
    Messages:
    2
    Likes Received:
    0
    Hey guys - I really need help with this.

    I'm running into the same error where it says "Error in an XML file: aborting build."
    But there is no error I can find, and nothing seems to be helping. Not restarting eclipse, not closing and reopening the project - I can't figure it out.

    Any ideas?? Thanks!
     
  6. wado1

    wado1 Active Member

    Joined:
    Jul 24, 2010
    Messages:
    31
    Likes Received:
    4
    Thanks Keith.
     

Share This Page

Loading...