开发者

Android trying to run my project in eclipse and end up with xml.out

Sometimes when I am working on a projects layout in Eclipse I hit the run button whi开发者_开发技巧le the active thing on the screen is still the layout.xml file. This causes eclipse to try to run just the xml file instead of the actual android project. I know that when I do this I can fix it by just deleting the xml.out file that gets created and clean/build on my project. However I remember using Eclipse at some point in the past when it didn't do this, if I hit run while working with an xml it still ran the Android project, just as if I had clicked run while editing a java file. My question is does anyone know if there is some sort of setting I can modify that will change the behavior back to that so that I don't have to switch back and forth to a java file just to run while I am actually doing work on the layout.

Edit: That works but now I can't launch any other applications that I am working on without resetting that preference. Is there perhaps a way to make it treat xml files as though they are 'not launchable' so that it will go down to option that I select for what to do if active resource is not launchable? Because the "Launch the associated project" option thats under that seems like exactly what I want it to do when I try to launch an xml file.


Under Preferences -> Run/Debug -> Launching, you can select "Always launch the previously launched application", so run the proper file once with this option marked and it will keep running the proper file for the rest of your life :)


Window -> Preferences -> Run/Debug -> Launching

On this page, under "Launch Operation", check the box next to "Always launch the previously launched application"


you can just select the project in the package explorer before performing a launch this way you do not end up with the xml launch configuration but with the project launch configuration where you can launch it as an android app.

This way you can keep the content of your editor

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜