1. Download our Official Android App: Forums for Android!

Apps Main.out.xml message

Discussion in 'Android Development' started by husainsn, May 19, 2010.

  1. husainsn

    husainsn Member
    Thread Starter
    5

    May 19, 2010
    7
    0
    5
    Hello
    I installed Eclipse and Android ADT. When I create android project and try to run, I get following on main.out.xml file:


    "This document is empty.
    Right click here to insert content"

    However, main.xml file has xml data for layout.

    Please help, what I need to do after right clicking. Thanks
     

    Advertisement

  2. powell

    powell Well-Known Member
    88

    Aug 14, 2009
    204
    117
    88
    Programmer
    PL
    If you try to run your project with *.xml file opened AND active in the editor (xml file must be shown in the active tab of the editor), Eclipse makes the *.out.xml file and your project does not run anymore.
    Try to delete the *.out.xml file and run the project again. This time close main.xml first, or at least display *.java file in front of it.
     
    Atarpan and xvladus1 like this.
  3. xvladus1

    xvladus1 New Member
    5

    Oct 1, 2010
    1
    0
    5
    Thank you! I've wasted 3 hrs on this, and might I say this bug doesn't make much sense at all OR the most obvious one =)
     
  4. Atarpan

    Atarpan New Member
    5

    Jan 16, 2012
    1
    0
    5
    Thank You ..... :)
     
  5. jonathanrz

    jonathanrz Well-Known Member
    36

    Jan 19, 2012
    75
    6
    36
    C++ programmer
    Brazil - Blumenau, SC
    I believe eclipse work this way for others languages, when you want to compile just one file.

    But I lost a lot of time with this bug too, sometimes is necessary to do a clean or refresh in the project too.
     
  6. odhran

    odhran Member
    35

    In eclipse, go to Window > Preferences > Run/Debug > Launching. Select "Always launch the previously launched application".

    Now you can hit the run button even if you have focus of a .xml file.
     
  7. jonathanrz

    jonathanrz Well-Known Member
    36

    Jan 19, 2012
    75
    6
    36
    C++ programmer
    Brazil - Blumenau, SC
    Eclipse will compile always the apliccation? Or if I edit a .java for exemple, Eclipse won't run the aplication before my edit?
     
  8. jiminaus

    jiminaus Well-Known Member
    63

    Oct 27, 2011
    190
    36
    63
    Sydney, Australia
    This setting odhran pointed out is about selecting a run configuration. It tells Eclipse to not try to launch the file your editing and to possibly create run configuration in the process, but to always just run the last run configuration that you explicitly chose from the run menu.

    This isn't that commonly found setting in IDEs that tells the IDE to launch the previously successful build in case of current build errors. That's "continue launch if project contains errors".


    While you're in the Launching preferences, change "Save required dirty editors before launching" to always and check "Wait for ongoing build to complete before launching" is also set to always.
     
    jonathanrz likes this.
  9. jonathanrz

    jonathanrz Well-Known Member
    36

    Jan 19, 2012
    75
    6
    36
    C++ programmer
    Brazil - Blumenau, SC
    Thanks, is boring always have to remember to unselect xml files, this will help me a lot :D
     
  10. KenDiriwan

    KenDiriwan New Member
    5

    Jan 25, 2012
    4
    0
    5
    Same thing happened to me. So :
    1. Do not run an .xml file.
    2. Delete the main.out.xml
    3. Project > clean > select the project that occur this error
    4. Done
     

Share This Page

Loading...