简体   繁体   English

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

[英]android emulator cannot run my applications. its starts the emulator but doesnt run the program

This is the output from the console window: 这是控制台窗口的输出:

[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!

From the beginning of the log to the end, you can see it takes about 10 minutes. 从日志开始到结束,您可以看到大约需要10分钟。 Is it my computer or is launching an application on the emulator always so slow? 它是我的计算机还是在模拟器上启动应用程序总是那么慢?

Have you tried changing the ADB connection timeout? 您是否尝试更改ADB连接超时? The default value is 5000, changing this to 10000 gives more time to try and install the said package, it worked for me. 默认值为5000,将其更改为10000可以让您有更多时间尝试安装上述包,这对我有用。 To do this go to window->Preferences->Android->DDMS. 要执行此操作,请转到window-> Preferences-> Android-> DDMS。

Have you set your API level in default.properties? 您是否在default.properties中设置了API级别? Try adding target=android-8 if you do not have it. 如果你没有,请尝试添加target=android-8

Also, as a side-note, it sounds like you are re-deploying the emulator every time you want to test. 另外,作为旁注,听起来每次要测试时都要重新部署模拟器。 You can start up the emulator once and then re-deploy the application to it as needed. 您可以启动模拟器一次,然后根据需要将应用程序重新部署到它。

Check this thread . 检查这个帖子。

Honeycomb preview - can not install my app on emulator under Eclipse Honeycomb预览 - 无法在Eclipse下的模拟器上安装我的应用程序

Answer number 2 works well for me ie start AVD separately from AVD manager > start, when it shows Home then Run your application 答案2对我来说效果很好,即从AVD管理器>启动时单独启动AVD,当它显示Home然后运行您的应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM