Eclipse下运行Android虚拟机,Run应用,正常的Console一般如下:
但是,Console也经常会报错,下面搜集了常见的几种报错:
1、Failed to install taobaohtc.apk on device 'emulator-5554': Connection refused: connect
[2012-02-14 16:33:43 - taobaohtc] ------------------------------ [2012-02-14 16:33:43 - taobaohtc] Android Launch! [2012-02-14 16:33:43 - taobaohtc] adb is running normally. [2012-02-14 16:33:43 - taobaohtc] Performing com.taobao.htc.Start activity launch [2012-02-14 16:33:43 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao' [2012-02-14 16:33:43 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554' [2012-02-14 16:33:44 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': Connection refused: connect [2012-02-14 16:33:44 - taobaohtc] java.net.ConnectException: Connection refused: connect [2012-02-14 16:33:44 - taobaohtc] Launch canceled!
2、emulator: emulator window was out of view and was recentred
3、The connection to adb is down, and a severe error has occured.
4、Failed to install taobaohtc.apk on device 'emulator-5554': timeout
5、WARNING: Data partition already in use. Changes will not persist!
6、Device not ready. Waiting 3 seconds before next attempt.
Can't connect to activity manager; is the system running?
[2012-02-24 11:22:15 - taobao] ------------------------------ [2012-02-24 11:22:15 - taobao] Android Launch! [2012-02-24 11:22:15 - taobao] adb is running normally. [2012-02-24 11:22:15 - taobao] Performing com.taobao.htc.Start activity launch [2012-02-24 11:22:15 - taobao] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao' [2012-02-24 11:22:15 - taobao] Uploading taobao.apk onto device 'emulator-5554' [2012-02-24 11:22:17 - taobao] Installing taobao.apk... [2012-02-27 11:22:34 - taobao] Success! [2012-02-27 11:22:35 - taobao] Starting activity com.taobao.htc.Start on device emulator-5554 [2012-02-27 11:22:38 - taobao] Device not ready. Waiting 3 seconds before next attempt. [2012-02-27 11:22:46 - taobao] ActivityManager: android.util.AndroidException: Can't connect to activity manager; is the system running?7、Sending jdwp tracking request failed!
[2012-03-02 12:32:54 - Logcat]null com.android.ddmlib.TimeoutException at com.android.ddmlib.AdbHelper.read(AdbHelper.java:648) at com.android.ddmlib.AdbHelper.read(AdbHelper.java:616) at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:216) at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:378) at com.android.ddmlib.Device.executeShellCommand(Device.java:284) at com.android.ddmuilib.logcat.LogPanel$3.run(LogPanel.java:527) [2012-03-02 12:33:19 - DeviceMonitor]Sending jdwp tracking request failed!8、Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
[2012-03-03 11:20:58 - taobaohtc] ------------------------------ [2012-03-03 11:20:58 - taobaohtc] Android Launch! [2012-03-03 11:20:58 - taobaohtc] adb is running normally. [2012-03-03 11:20:58 - taobaohtc] Performing com.taobao.htc.Start activity launch [2012-03-03 11:20:58 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'jinhua' [2012-03-03 11:20:58 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554' [2012-03-03 11:21:00 - taobaohtc] Installing taobaohtc.apk... [2012-03-03 11:21:13 - taobaohtc] Success! [2012-03-03 11:21:14 - taobaohtc] Starting activity com.taobao.htc.Start on device emulator-5554 [2012-03-03 11:21:15 - taobaohtc] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.taobao.htc/.Start } [2012-03-03 11:21:17 - taobaohtc] Attempting to connect debugger to 'com.taobao.htc' on port 8634 [2012-03-03 11:21:19 - taobaohtc] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE [2012-03-03 11:21:19 - taobaohtc] Please check logcat output for more details. [2012-03-03 11:21:19 - taobaohtc] Launch canceled!9、java.io.IOException: EOF
[2012-03-05 15:05:28 - taobaohtc] ------------------------------ [2012-03-05 15:05:28 - taobaohtc] Android Launch! [2012-03-05 15:05:28 - taobaohtc] adb is running normally. [2012-03-05 15:05:28 - taobaohtc] Performing com.taobao.htc.Start activity launch [2012-03-05 15:05:28 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao' [2012-03-05 15:05:28 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554' [2012-03-05 15:05:30 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': EOF [2012-03-05 15:05:30 - taobaohtc] java.io.IOException: EOF [2012-03-05 15:05:30 - taobaohtc] Launch canceled!
10、com.android.ddmlib.InstallException: device not found
解决办法:
对上述报错,一般的处理方式是
1、关闭虚拟机,再重新Run应用。
关闭虚拟机,直接在任务栏上右键点击虚拟机程序,在弹出菜单中左键点击“关闭”,等待虚拟机程序退出。
2、如果按第一点操作还是无法正常工作。需关闭虚拟机,退出Eclipse,并在任务管理器中结束“adb.exe”进程(如果有的话)。
按照上述办法操作,大多数Run应用,Console报的错误都可以得到解决。