[html]view plaincopy
- Android 2.3.3
- Eclipse Version: 3.7.0
- Console
Eclipse下运行Android虚拟机,Run应用,正常的Console一般如下:
- [2012-02-20 15:01:28 - taobaohtc] ------------------------------
- [2012-02-20 15:01:28 - taobaohtc] Android Launch!
- [2012-02-20 15:01:28 - taobaohtc] adb is running normally.
- [2012-02-20 15:01:28 - taobaohtc] Performing com.taobao.htc.Start activity launch
- [2012-02-20 15:01:28 - taobaohtc] Automatic Target Mode: launching new emulator with compatible AVD 'jinhua'
- [2012-02-20 15:01:28 - taobaohtc] Launching a new emulator with Virtual Device 'jinhua'
- [2012-02-20 15:01:30 - Emulator] emulator: emulator window was out of view and was recentred
- [2012-02-20 15:01:30 - Emulator]
- [2012-02-20 15:01:30 - taobaohtc] New emulator found: emulator-5554
- [2012-02-20 15:01:30 - taobaohtc] Waiting for HOME ('android.process.acore') to be launched...
- [2012-02-20 15:01:30 - Emulator] Unknown savevm section type 95
- [2012-02-20 15:02:00 - taobaohtc] HOME is up on device 'emulator-5554'
- [2012-02-20 15:02:00 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'
- [2012-02-20 15:02:02 - taobaohtc] Installing taobaohtc.apk...
- [2012-02-20 15:02:29 - taobaohtc] Success!
- [2012-02-20 15:02:29 - taobaohtc] Starting activity com.taobao.htc.Start on device emulator-5554
但是,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
- [2012-02-20 14:54:10 - taobaohtc] ------------------------------
- [2012-02-20 14:54:10 - taobaohtc] Android Launch!
- [2012-02-20 14:54:10 - taobaohtc] adb is running normally.
- [2012-02-20 14:54:10 - taobaohtc] Performing com.taobao.htc.Start activity launch
- [2012-02-20 14:54:10 - taobaohtc] Automatic Target Mode: launching new emulator with compatible AVD 'taobao'
- [2012-02-20 14:54:10 - taobaohtc] Launching a new emulator with Virtual Device 'taobao'
- [2012-02-20 14:54:16 - Emulator] emulator: emulator window was out of view and was recentred
- [2012-02-20 14:54:16 - Emulator]
- [2012-02-20 14:54:16 - taobaohtc] New emulator found: emulator-5554
- [2012-02-20 14:54:16 - taobaohtc] Waiting for HOME ('android.process.acore') to be launched...
- [2012-02-20 14:54:16 - Emulator] Unknown savevm section type 95
- [2012-02-20 14:55:32 - taobaohtc] emulator-5554 disconnected! Cancelling 'com.taobao.htc.Start activity launch'!
3、The connection to adb is down, and a severe error has occured.
- [2012-02-14 17:30:47 - taobaohtc] ------------------------------
- [2012-02-14 17:30:47 - taobaohtc] Android Launch!
- [2012-02-14 17:30:47 - taobaohtc] The connection to adb is down, and a severe error has occured.
- [2012-02-14 17:30:47 - taobaohtc] You must restart adb and Eclipse.
- [2012-02-14 17:30:47 - taobaohtc] Please ensure that adb is correctly located
4、Failed to install taobaohtc.apk on device 'emulator-5554': timeout
- [2012-02-16 11:11:55 - taobaohtc] ------------------------------
- [2012-02-16 11:11:55 - taobaohtc] Android Launch!
- [2012-02-16 11:11:55 - taobaohtc] adb is running normally.
- [2012-02-16 11:11:55 - taobaohtc] Performing com.taobao.htc.Start activity launch
- [2012-02-16 11:11:55 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao'
- [2012-02-16 11:11:55 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'
- [2012-02-16 11:12:01 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': timeout
- [2012-02-16 11:12:01 - taobaohtc] Launch canceled!at 'D:\develop\Android\android-sdk\platform-tools\adb.exe' and can be executed.
5、WARNING: Data partition already in use. Changes will not persist!
- [2012-02-20 15:00:22 - taobaohtc] ------------------------------
- [2012-02-20 15:00:22 - taobaohtc] Android Launch!
- [2012-02-20 15:00:22 - taobaohtc] adb is running normally.
- [2012-02-20 15:00:22 - taobaohtc] Performing com.taobao.htc.Start activity launch
- [2012-02-20 15:00:22 - taobaohtc] Automatic Target Mode: launching new emulator with compatible AVD 'taobao'
- [2012-02-20 15:00:22 - taobaohtc] Launching a new emulator with Virtual Device 'taobao'
- [2012-02-20 15:00:25 - Emulator] WARNING: Data partition already in use. Changes will not persist!
- [2012-02-20 15:00:25 - Emulator] WARNING: SD Card p_w_picpath already in use: C:\Documents and Settings\Administrator\.android\avd\taobao.avd/sdcard.img
- [2012-02-20 15:00:25 - Emulator] ko:Snapshot storage already in use: C:\Documents and Settings\Administrator\.android\avd\taobao.avd/snapshots.img
6、Device not ready. Waiting 3 seconds before next attempt.
Can't connect to activity manager; is the system running?
[java]view plaincopy
- [2012-02-2411:22:15 - taobao] ------------------------------
- [2012-02-2411:22:15 - taobao] Android Launch!
- [2012-02-2411:22:15 - taobao] adb is running normally.
- [2012-02-2411:22:15 - taobao] Performing com.taobao.htc.Start activity launch
- [2012-02-2411:22:15 - taobao] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao'
- [2012-02-2411:22:15 - taobao] Uploading taobao.apk onto device 'emulator-5554'
- [2012-02-2411:22:17 - taobao] Installing taobao.apk...
- [2012-02-2711:22:34 - taobao] Success!
- [2012-02-2711:22:35 - taobao] Starting activity com.taobao.htc.Start on device emulator-5554
- [2012-02-2711:22:38 - taobao] Device not ready. Waiting 3 seconds before next attempt.
- [2012-02-2711: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-0212: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-0212:33:19 - DeviceMonitor]Sending jdwp tracking request failed!
8、Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
- [2012-03-0311:20:58 - taobaohtc] ------------------------------
- [2012-03-0311:20:58 - taobaohtc] Android Launch!
- [2012-03-0311:20:58 - taobaohtc] adb is running normally.
- [2012-03-0311:20:58 - taobaohtc] Performing com.taobao.htc.Start activity launch
- [2012-03-0311:20:58 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'jinhua'
- [2012-03-0311:20:58 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'
- [2012-03-0311:21:00 - taobaohtc] Installing taobaohtc.apk...
- [2012-03-0311:21:13 - taobaohtc] Success!
- [2012-03-0311:21:14 - taobaohtc] Starting activity com.taobao.htc.Start on device emulator-5554
- [2012-03-0311:21:15 - taobaohtc] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.taobao.htc/.Start }
- [2012-03-0311:21:17 - taobaohtc] Attempting to connect debugger to 'com.taobao.htc' on port 8634
- [2012-03-0311:21:19 - taobaohtc] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
- [2012-03-0311:21:19 - taobaohtc] Please check logcat output for more details.
- [2012-03-0311:21:19 - taobaohtc] Launch canceled!
9、java.io.IOException: EOF
- [2012-03-0515:05:28 - taobaohtc] ------------------------------
- [2012-03-0515:05:28 - taobaohtc] Android Launch!
- [2012-03-0515:05:28 - taobaohtc] adb is running normally.
- [2012-03-0515:05:28 - taobaohtc] Performing com.taobao.htc.Start activity launch
- [2012-03-0515:05:28 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao'
- [2012-03-0515:05:28 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'
- [2012-03-0515:05:30 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': EOF
- [2012-03-0515:05:30 - taobaohtc] java.io.IOException: EOF
- [2012-03-0515:05:30 - taobaohtc] Launch canceled!
10、com.android.ddmlib.InstallException: device not found
- [2012-03-0909:24:31 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': device not found
- [2012-03-0909:24:31 - taobaohtc] com.android.ddmlib.InstallException: device not found
- [2012-03-0909:24:31 - taobaohtc] Launch canceled!
解决办法:
对上述报错,一般的处理方式是
1、关闭虚拟机,再重新Run应用。
关闭虚拟机,直接在任务栏上右键点击虚拟机程序,在弹出菜单中左键点击“关闭”,等待虚拟机程序退出。
2、如果按第一点操作还是无法正常工作。需关闭虚拟机,退出Eclipse,并在任务管理器中结束“adb.exe”进程(如果有的话)。