Android模拟器无法运行的应用程序从启动Eclipse [英] Android Emulator won't run application started from eclipse

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

问题描述

我跟了来自谷歌的Andr​​oid开发者指南中的Hello World的例子。当我尝试运行在SDK模拟器的应用程序,没有任何反应。仿真器startd起来好听,但没有任何反应后。我甚至不能看到应用程序托盘中的应用程序。

I have followed the "Hello World" example from Google's Android developer's guide. When I try to run the application in the SDK emulator, nothing happens. The emulator startd up nicely, but after that nothing happens. I can't even see the application in the app tray.

我使用的Eclipse的Andr​​oid插件安装。

I am using Eclipse with the Android add-on installed.

推荐答案

同样在这里;仿真器加载罚款,但APK不会安装不。问题是只与模拟器。所有工作正常,如果物理连接带USB调试的设备打开。

Same here; emulator loads fine but apk doesn't get installed. Problem is only with the emulator. All works fine if physically connecting a device with USB debugging turned on.

注:这突然开始发生没有明显的原因。所有用于正常工作。

NB This suddenly started happening for no apparent reason. All used to work fine.

我已经试过卸载并重新安装ADT插件,我已经更新了Android SDK和AVD管理器到最新的。 (工具修改7),但问题仍然存在。

I've tried uninstalling and reinstalling the ADT Plugin and I've updated the Android SDK and AVD Manager to the latest available. (Tools revision 7) but the problem continues.

的Eclipse:赫利俄斯服务版本1 建立ID:20100917-0705 运行在Windows XP SP2

Eclipse: Helios Service Release 1 Build id: 20100917-0705 Running on Windows XP SP2

正如其他人发布,控制台日志显示

Just as others have posted, the console log shows

[2010-10-14 11:39:33 - uad-MediaPlayerExample] ------------------------------
[2010-10-14 11:39:33 - uad-MediaPlayerExample] Android Launch!
[2010-10-14 11:39:33 - uad-MediaPlayerExample] adb is running normally.
[2010-10-14 11:39:33 - uad-MediaPlayerExample] Performing com.msi.manning.chapter10.MediaPlayerExample.MediaPlayerActvity activity launch
[2010-10-14 11:39:33 - uad-MediaPlayerExample] Automatic Target Mode: launching new emulator with compatible AVD '1.6-hvga'
[2010-10-14 11:39:33 - uad-MediaPlayerExample] Launching a new emulator with Virtual Device '1.6-hvga'

LogCat中保持为空/空。

LogCat remains empty/blank.

如果我再尝试重新运行相同的应用程序,控制台显示:

And if I then try to re-run the same app, the console shows:

[2010-10-14 11:39:33 - Emulator] emulator: ERROR: the user data image is used by another emulator. aborting


可能的答案??? 一种解决方案似乎是杀死adb.exe进程在Windows任务管理器(在仿真仍在运行)。


POSSIBLE ANSWER??? One solution seems to be to kill the adb.exe process in Windows Task Manager (while the emulator is still running).

(从<一个href="http://vikashazrati.word$p$pss.com/2008/01/01/quicktip-android-does-not-load-my-application-in-the-emulator/">http://vikashazrati.word$p$pss.com/2008/01/01/quicktip-android-does-not-load-my-application-in-the-emulator/)

控制台突然显示大量的错误的:

The console suddenly shows lots of errors:

[2010-10-14 12:12:00 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:01 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:01 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:02 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:02 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:03 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:03 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:04 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:04 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:05 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:05 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host
[2010-10-14 12:12:06 - DeviceMonitor]Sending Tracking request failed!
[2010-10-14 12:12:06 - DeviceMonitor]Adb connection Error:An existing connection was forcibly closed by the remote host

但应用程序在启动模拟器。 !

but the app starts in the emulator. !!!

(如预期的LogCat中也突然开始显示大量邮件)

(as expected the LogCat also suddenly starts to display lots of messages)

一切工作正常 - 即你可以在你的code工作,并在同一个仿真器重新运行应用程序,它重新安装如预期...

All works fine - i.e. you can work on your code and re-run the app in the same emulator and it reinstalls as expected...

如果你关闭模拟器,你看到下面的控制台错误:

BUT if you close the emulator, you see the following console error:

[2010-10-14 12:15:05 - DeviceMonitor]Sending jdwp tracking request failed!

和同样的问题再次出现 - 将出现一个新的仿真器,但没有安装APK。所以,你需要返回到Windows任务管理器,并再次杀死adb.exe进程。

And the same problem reoccurs - a new emulator appears but the apk isn't installed. So you need to go back to Windows Task Manager and once again kill the adb.exe process.

注:我发现adb.exe不会在任务管理器中重新出现,除非我重新启动Eclipse,因此关闭一个模拟器后,必须重新启动Eclipse,尝试运行(它无法显示的应用程序),然后回到任务经理,adb.exe再次上市,并杀掉该进程为应用程序来启动。

NB I find that adb.exe doesn't reappear in the Task Manager unless I restart Eclipse, so after closing an emulator you have to restart Eclipse, try Run (which fails to display the app) then go back to the Task Manager where adb.exe is once again listed and kill the process for the app to start.

将是巨大的,如果有人可以提供这样的一个解释,一个永久性的修复...

Would be great if someone could provide an explanation for this and a permanent fix...

这篇关于Android模拟器无法运行的应用程序从启动Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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