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

Apps Main.out.xml message

husainsn

Lurker
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
 
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.
 
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.

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 =)
 
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.
 
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.
 
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.

Eclipse will compile always the apliccation? Or if I edit a .java for exemple, Eclipse won't run the aplication before my edit?
 
Eclipse will compile always the apliccation? Or if I edit a .java for exemple, Eclipse won't run the aplication before my edit?

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.
 
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
 
Back
Top Bottom