在你开始之前:我搜索了谷歌和stackoverflow,没有一个给出明确的答案.
Before u start: I searched the google and stackoverflow, none of them gave clear answer.
情况:我在 Windows 上使用 Eclipse 来开发 Android 应用程序.所以当我尝试运行应用程序时,系统会输出到控制台
Situation: I'm using Eclipse on Windows to develop Android application. So when I'm trying to run the app, the system outputs to console
[2010-06-14 17:04:39 - HelloLinearLayout] ------------------------------
[2010-06-14 17:04:39 - HelloLinearLayout] Android Launch!
[2010-06-14 17:04:39 - HelloLinearLayout] adb is running normally.
[2010-06-14 17:04:39 - HelloLinearLayout] Performing com.example.HelloLinearLayout.HelloLinearLayout activity launch
[2010-06-14 17:04:39 - HelloLinearLayout] Automatic Target Mode: launching new emulator with compatible AVD 'Default_2.1'
[2010-06-14 17:04:39 - HelloLinearLayout] Launching a new emulator with Virtual Device 'Default_2.1'
启动模拟器,但不上传 .apk 并且不启动活动.所以,应用程序无论如何都没有启动.
starts the emulator, but doesn't upload the .apk and doesn't start the activity. So, app is not started anyway.
我找到了一个解决方案"here,但不清楚并且似乎不起作用.例如,我不知道要杀死哪个模拟器处理".我只找到了 adb.exe.这就是重点:有时我很幸运能够杀死他们想要的所有东西并启动应用程序.但还没有确定.
I found a "solution" here, but it's unclear and seems to not work. For example, I don't know, which "emulator processed" are meant to be killed. I found adb.exe only. And that's the main point: sometimes I'm lucky enough to kill all that they wanted and start the app. But it's undetermined.
请帮忙,我完全被这个问题困住了.
Please help, I'm completely stuck with this trouble.
我已经多次遇到这种情况,不得不做几件事来解决这个问题.
I've run into this situation many times and have had to do several things to resolve the issue.
1) 如果 DDMS 正在运行,请将其关闭(有时会干扰调试).
1) If DDMS is running, close it (it seems to interfere with debugging sometimes).
2) 启动模拟器,尝试连接DDMS,然后断开连接,然后返回eclipse并启动调试器.
2) Start the emulator, try connecting with DDMS, then disconnect, then go back to eclipse and start the debuggerer.
3) 杀死模拟器,在任务管理器中杀死adb进程,重启eclipse,然后尝试调试让Eclipse启动模拟器,有时模拟器第一次加载超时,完全启动后,重新开始调试.
3) Kill the emulator, kill the adb process in task manager, restart eclipse, then try debugging letting Eclipse launch the emulator, sometimes the first load of the emulator times out so when it's fully started up, start debugging again.
但总的来说,我发现不使用模拟器并使用实际设备要容易得多,对我来说这是一个更快的过程.
Overall though, I've found it is much easier to not use the emulator and use an actual device, for me it's a much faster process.
这篇关于Android 应用程序不从 Eclipse 启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!