android模拟器无法运行我的应用程序。它启动模拟器但不运行程序

时间:2011-04-26 13:28:39

标签: android eclipse android-emulator adt

这是控制台窗口的输出:

[2011-04-26 13:49:08 - Snake] ------------------------------

[2011-04-26 13:49:08 - Snake] Android Launch!

[2011-04-26 13:49:08 - Snake] adb is running normally.

[2011-04-26 13:49:08 - Snake] Performing com.example.android.snake.Snake activity launch

[2011-04-26 13:49:08 - Snake] Automatic Target Mode: launching new emulator with compatible AVD 'avd_2.2'

[2011-04-26 13:49:08 - Snake] Launching a new emulator with Virtual Device 'avd_2.2'

[2011-04-26 13:49:13 - Snake] New emulator found: emulator-5554

[2011-04-26 13:49:13 - Snake] Waiting for HOME ('android.process.acore') to be launched...

[2011-04-26 13:54:38 - Snake] WARNING: Application does not specify an API level requirement!

[2011-04-26 13:54:38 - Snake] Device API version is 8 (Android 2.2)

[2011-04-26 13:54:38 - Snake] HOME is up on device 'emulator-5554'

[2011-04-26 13:54:38 - Snake] Uploading Snake.apk onto device 'emulator-5554'

[2011-04-26 13:54:38 - Snake] Installing Snake.apk...

[2011-04-26 13:58:55 - Snake] Failed to install Snake.apk on device 'emulator-5554!

[2011-04-26 13:58:55 - Snake] (null)

[2011-04-26 13:59:01 - Snake] Failed to install Snake.apk on device 'emulator-5554': null

[2011-04-26 13:59:01 - Snake] com.android.ddmlib.InstallException

[2011-04-26 13:59:01 - Snake] Launch canceled!

从日志开始到结束,您可以看到大约需要10分钟。它是我的计算机还是在模拟器上启动应用程序总是这么慢?

3 个答案:

答案 0 :(得分:1)

您是否尝试过更改ADB连接超时?默认值为5000,将其更改为10000可以让您有更多时间尝试安装上述包,这对我有用。 要执行此操作,请转到window-> Preferences-> Android-> DDMS。

答案 1 :(得分:0)

您是否在default.properties中设置了API级别?如果您没有,请尝试添加target=android-8

另外,作为旁注,听起来每次要测试时都要重新部署模拟器。您可以启动模拟器一次,然后根据需要将应用程序重新部署到它。

答案 2 :(得分:0)

检查此帖子。

Honeycomb preview - can not install my app on emulator under Eclipse

答案2对我来说效果很好,即与AVD管理器分开启动AVD>开始,当它显示Home然后运行你的应用程序