Android Emulator不会运行从eclipse启动的应用程序 [英] Android Emulator won't run application started from eclipse

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

问题描述

我已经遵循了Google Android开发者指南中的Hello World的例子。当我尝试在SDK模拟器中运行应用程序时,没有任何反应。仿真器很好地启动,但之后没有任何反应。我甚至不能在应用程序托盘中看到应用程序。



我正在使用安装了Android附加组件的Eclipse。

解决方案

模拟器加载正常,但apk未安装。问题只在于仿真器。如果物理连接设备与USB调试开启,所有工作正常。



NB这个突然开始发生没有明显的原因。所有以前工作正常。



我已经尝试卸载并重新安装ADT插件,并将Android SDK和AVD Manager更新为最新版本。 (工具修订版7),但问题仍然存在。



Eclipse:Helios Service Release 1
Build id:20100917-0705
在Windows XP SP2上运行



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

  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正常运行。
[2010-10-14 11:39:33 - uad-MediaPlayerExample]执行com.msi.manning.chapter10.MediaPlayerExample.MediaPlayerActvity活动启动
[2010-10-14 11:39:33 - uad-MediaPlayerExample]自动目标模式:启动具有兼容AVD'1.6-hvga'的新模拟器
[2010-10-14 11:39:33 - uad-MediaPlayerExample]使用虚拟设备启动新的仿真器1.6-hvga '

LogCat保持为空/空白。



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

  [2010-10-14 11: 39:33  - 仿真器]仿真器:错误:另一个仿真器使用用户数据映像。中止






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



来自 http ://vikashazrati.wordpress.com/2008/01/01/quicktip-android-does-not-load-my-application-in-the-emulator/



控制台突然显示很多错误:

  [2010-10-14 12:12:00  -  DeviceMonitor ] Adb连接错误:现有连接被远程主机强制关闭
[2010-10-14 12:12:01 - DeviceMonitor]发送跟踪请求失败!
[2010-10-14 12:12:01 - DeviceMonitor] Adb连接错误:现有连接被远程主机强制关闭
[2010-10-14 12:12:02 - DeviceMonitor]发送跟踪请求失败!
[2010-10-14 12:12:02 - DeviceMonitor] Adb连接错误:现有连接被远程主机强制关闭
[2010-10-14 12:12:03 - DeviceMonitor]发送跟踪请求失败!
[2010-10-14 12:12:03 - DeviceMonitor] Adb连接错误:现有连接被远程主机强制关闭
[2010-10-14 12:12:04 - DeviceMonitor]发送跟踪请求失败!
[2010-10-14 12:12:04 - DeviceMonitor] Adb连接错误:现有连接被远程主机强制关闭
[2010-10-14 12:12:05 - DeviceMonitor]发送跟踪请求失败!
[2010-10-14 12:12:05 - DeviceMonitor] Adb连接错误:现有连接被远程主机强制关闭
[2010-10-14 12:12:06 - DeviceMonitor]发送跟踪请求失败!
[2010-10-14 12:12:06 - DeviceMonitor] Adb连接错误:现有连接被远程主机强制关闭

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



(正如预期的那样,LogCat也会突然开始显示大量消息)



- 即,您可以处理代码,并在同一个模拟器中重新运行应用程序,并按预期方式重新安装。



但是如果关闭模拟器,您会看到以下控制台错误:

  [2010-10-14 12:15:05  -  DeviceMonitor]发送jdwp跟踪请求失败! 

同样的问题重现 - 一个新的模拟器出现,但没有安装apk。所以你需要回到Windows任务管理器,再次杀死adb.exe进程。



NB我发现adb.exe没有重新出现在任务管理器除非我重新启动Eclipse,所以在关闭一个模拟器后,你必须重新启动Eclipse,尝试运行(无法显示应用程序),然后返回到任务管理器,其中adb.exe被再次列出,并杀死应用程序启动的过程。



如果有人可以为此提供解释并进行永久修复,则会很棒...


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.

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

解决方案

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.

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: 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 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


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

(from http://vikashazrati.wordpress.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. !!!

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

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!

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.

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 Emulator不会运行从eclipse启动的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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