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

Main.out.xml message

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

  1. husainsn

    husainsn Lurker
    Thread Starter

    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

    1. Download the Forums for Android™ app!


  2. powell

    powell Well-Known Member

    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 Lurker

    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 Lurker

    Thank You ..... :)
  5. jonathanrz

    jonathanrz Member

    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 Newbie

    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 Member

    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

    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 Member

    Thanks, is boring always have to remember to unselect xml files, this will help me a lot :D
  10. KenDiriwan

    KenDiriwan Lurker

    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