让月食调试我的Andr​​oid项目我的、月食、项目、Andr

2023-09-07 04:52:18 作者:曲终人散茶凉梦醒

我写使用Eclipse的Andr​​oid应用程序。当我在左边的树形视图中单击项目,然后单击调试,IDE将生成一个APK安装,并在预期的模拟器/设备。

I am writing an Android application using Eclipse. When I click on the project in the left tree view and then click debug, the IDE builds an APK and installs in the emulator / device as expected.

不过,如果我编辑的文件,却忘了先点击该项目试图调试前,IDE认为我要调试特定的Java文件。这不是我想做的事情,我想它来建立和模拟/安装在设备如常。

However, if I'm editing a file and forget to first click on the project before attempting to debug, the IDE thinks I want to debug that specific Java file. This is NOT what I want to do, I would like it to build and emulate / install on device as usual.

有没有办法改变在Eclipse这种行为?

Is there any way to change this behavior in Eclipse?

推荐答案

在Eclipse中,您可以在工作空间preferences设置/运行调试/启动总是启动previously启动的应用程序(直到你明确选择在其它应用:那么这将是将要推出的最后一个)

In eclipse, you can set in workspace preferences / run-debug / launching to always launch the previously launched application (until you explicitly choose an other application: then it will be the last that will be launched).

这样的话,无论你在哪里preSS(CTRL)F11或者点击调试/运行按钮,你上次使用的启动配置将会再次调用。

This way, no matter where you press (ctrl)F11 or click the debug/run button, the launch configuration you used the last time will be called again.

您仍可以启动,当然不同的应用程序,通过显式调用其发射(你现在调试的方式)。

You will still be able to launch different applications of course, by explicitly calling their launchers (the way you debug now).