Android应用程序不能从Eclipse启动 [英] Android application doesn't start from Eclipse

查看:179
本文介绍了Android应用程序不能从Eclipse启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在你开始之前:我搜索了google和stackoverflow,没有人给出明确的答案。



情况:我在Windows上使用Eclipse开发Android应用程序。所以当我试图运行应用程序时,系统输出到控制台

  [2010-06-14 17:04: 39  -  HelloLinearLayout] ------------------------------ 
[2010-06-14 17:04:39 - HelloLinearLayout] Android Launch!
[2010-06-14 17:04:39 - HelloLinearLayout] adb正常运行。
[2010-06-14 17:04:39 - HelloLinearLayout]执行com.example.HelloLinearLayout.HelloLinearLayout活动启动
[2010-06-14 17:04:39 - HelloLinearLayout]自动目标模式:启动新的模拟器与兼容的AVD'Default_2.1'
[2010-06-14 17:04:39 - HelloLinearLayout]启动一个新的模拟器与虚拟设备'Default_2.1'

启动模拟器,但不会上传.apk并且不启动该活动。所以,应用程序不会开始。



我发现了一个解决方案这里,但不清楚,似乎不起作用。例如,我不知道,哪个模拟器处理是为了被杀死。我发现只有adb.exe。这就是要点:有时我很幸运能够杀死他们想要的所有东西并启动应用程序。但是这是不确定的。



请帮助,我完全陷入了这个麻烦。

解决方案

我已经遇到这种情况了很多次,不得不做几件事来解决问题。



1)如果DDMS正在运行,关闭(它似乎有时会干扰调试)。



2)启动仿真器,尝试与DDMS连接,然后断开连接,然后返回到eclipse并启动调试器。 3)杀死模拟器,在任务管理器中杀死adb进程,重新启动eclipse,然后尝试调试让Eclipse启动模拟器,有时模拟器的第一次加载超时所以当它完全启动时,再次开始调试。



总的来说,我发现不用使用仿真器并使用实际的设备更容易,对我来说这是一个更快的过程。


Before u start: I searched the google and stackoverflow, none of them gave clear answer.

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'

starts the emulator, but doesn't upload the .apk and doesn't start the activity. So, app is not started anyway.

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) If DDMS is running, close it (it seems to interfere with debugging sometimes).

2) Start the emulator, try connecting with DDMS, then disconnect, then go back to eclipse and start the debuggerer.

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启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆