1. Are you ready for the Galaxy S20? Here is everything we know so far!

New Developer with a problem. PLEASE HELP

Discussion in 'Android Development' started by Cliff254, Jan 8, 2010.

  1. Cliff254

    Cliff254 Lurker
    Thread Starter

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


  2. eclipsed4utoo

    eclipsed4utoo Android Enthusiast

    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

    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 Lurker
    Thread Starter

    Keith, that worked perfectly! Thank you soo much!!
     
  5. phiredrop

    phiredrop Lurker

    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 Newbie

    Thanks Keith.
     
Loading...
Similar Threads - Developer problem PLEASE
  1. Diaforus
    Replies:
    0
    Views:
    173
  2. Flagrant_Vagrant
    Replies:
    8
    Views:
    204
  3. Toks777
    Replies:
    2
    Views:
    280
  4. MoodyBlues
    Replies:
    4
    Views:
    318
  5. Doit Studio
    Replies:
    3
    Views:
    357
  6. Amine Hakmaoui
    Replies:
    1
    Views:
    191
  7. mitchbauers
    Replies:
    4
    Views:
    727
  8. Champion Buckler
    Replies:
    3
    Views:
    531
  9. Darketernal
    Replies:
    2
    Views:
    1,521
  10. martinbitai
    Replies:
    1
    Views:
    266

Share This Page

Loading...