简体   繁体   English

Android模拟器重新部署挂起

[英]Android Emulator Redeployment Hangs

Everytime I redeploy an android application it hangs at this step: 每次我重新部署一个android应用程序时,它都会在此步骤挂起:

[2010-12-14 09:48:40 - HelloWorld] Uploading HelloWorld.apk onto device 'emulator-5554' [2010-12-14 09:48:40-HelloWorld]将HelloWorld.apk上传到设备“ emulator-5554”上

[2010-12-14 09:48:49 - HelloWorld] Installing HelloWorld.apk... [2010-12-14 09:48:49-HelloWorld]正在安装HelloWorld.apk ...

If I then go into the DDMS, I can kill the process (by hitting the stop sign) and then it finishes and launches the application. 如果然后进入DDMS,则可以终止进程(通过单击停止标志),然后该过程完成并启动该应用程序。 Any idea how to fix this? 任何想法如何解决这个问题? I've rebuilt the emulator, rebuilt the workspace etc with the same behavior. 我已经重建了模拟器,重建了具有相同行为的工作区等。 I'm using Eclipse build 20100218-1602 我正在使用Eclipse build 20100218-1602

you may want to uninstall the app if it already exists on your phone, 如果手机上已存在该应用,则可能需要卸载该应用,

on the phone Menu > Settings > Applications > Manage Applications > find the app and then click the "uninstall" button 在电话上>设置>应用程序>管理应用程序>查找应用程序,然后单击“卸载”按钮

or with adb 或与adb

adb uninstall [-k] - remove this app package from the device adb卸载[-k]-从设备中删除此应用包
('-k' means keep the data and cache directories) (“ -k”表示保留数据和缓存目录)

checkout this link http://developer.android.com/guide/developing/eclipse-adt.html on running apps on devices or emulators 在设备或模拟器上运行的应用程序上查看此链接http://developer.android.com/guide/developing/eclipse-adt.html

Automatic and manual target modes By default, a run configuration uses the automatic target mode in order to select an AVD. 自动和手动目标模式默认情况下,运行配置使用自动目标模式来选择AVD。 In this mode, ADT will select an AVD for the application in the following manner: 在这种模式下,ADT将以以下方式为应用程序选择一个AVD:

If there's a device or emulator already running and its AVD configuration meets the requirements of the application's build target, the application is installed and run upon it. 如果已经在运行设备或仿真器,并且其AVD配置满足应用程序构建目标的要求,则将在该应用程序上安装并运行该应用程序。 If there's more than one device or emulator running, each of which meets the requirements of the build target, a "device chooser" is shown to let you select which device to use. 如果运行的设备或仿真器不止一个,且每个设备或仿真器均满足构建目标的要求,则会显示“设备选择器”,让您选择要使用的设备。 If there are no devices or emulators running that meet the requirements of the build target, ADT looks at the available AVDs. 如果没有满足构建目标要求的设备或仿真器正在运行,则ADT将查看可用的AVD。 If one meets the requirements of the build target, the AVD is used to launch a new emulator, upon which the application is installed and run. 如果满足构建目标的要求,则可以使用AVD启动新的仿真器,并在该仿真器上安装并运行该应用程序。 If all else fails, the application will not be run and you will see a console error warning you that there is no existing AVD that meets the build target requirements. 如果所有其他方法均失败,则该应用程序将无法运行,并且您将看到一个控制台错误,警告您不存在满足构建目标要求的AVD。 However, if a "preferred AVD" is selected in the run configuration, then the application will always be deployed to that AVD. 但是,如果在运行配置中选择了“首选AVD”,则该应用程序将始终部署到该AVD。 If it's not already running, then a new emulator will be launched. 如果尚未运行,则将启动一个新的模拟器。

If your run configuration uses manual mode, then the "device chooser" is presented every time that your application is run, so that you can select which AVD to use. 如果运行配置使用手动模式,则每次运行应用程序时都会显示“设备选择器”,以便您选择要使用的AVD。

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

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