博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【和小强学移动app测试5】Android虚拟机无法正常工作几例及解决办法
阅读量:7113 次
发布时间:2019-06-28

本文共 9212 字,大约阅读时间需要 30 分钟。

[html]

  1. Android 2.3.3  

  2. Eclipse Version: 3.7.0  

  3. Console  

Eclipse下运行Android虚拟机,Run应用,正常的Console一般如下:

[html]

  1. [2012-02-20 15:01:28 - taobaohtc] ------------------------------  

  2. [2012-02-20 15:01:28 - taobaohtc] Android Launch!  

  3. [2012-02-20 15:01:28 - taobaohtc] adb is running normally.  

  4. [2012-02-20 15:01:28 - taobaohtc] Performing com.taobao.htc.Start activity launch  

  5. [2012-02-20 15:01:28 - taobaohtc] Automatic Target Mode: launching new emulator with compatible AVD 'jinhua'  

  6. [2012-02-20 15:01:28 - taobaohtc] Launching a new emulator with Virtual Device 'jinhua'  

  7. [2012-02-20 15:01:30 - Emulator] emulator: emulator window was out of view and was recentred  

  8. [2012-02-20 15:01:30 - Emulator]  

  9. [2012-02-20 15:01:30 - taobaohtc] New emulator found: emulator-5554  

  10. [2012-02-20 15:01:30 - taobaohtc] Waiting for HOME ('android.process.acore') to be launched...  

  11. [2012-02-20 15:01:30 - Emulator] Unknown savevm section type 95  

  12. [2012-02-20 15:02:00 - taobaohtc] HOME is up on device 'emulator-5554'  

  13. [2012-02-20 15:02:00 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'  

  14. [2012-02-20 15:02:02 - taobaohtc] Installing taobaohtc.apk...  

  15. [2012-02-20 15:02:29 - taobaohtc] Success!  

  16. [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

[html]

  1. [2012-02-14 16:33:43 - taobaohtc] ------------------------------  

  2. [2012-02-14 16:33:43 - taobaohtc] Android Launch!  

  3. [2012-02-14 16:33:43 - taobaohtc] adb is running normally.  

  4. [2012-02-14 16:33:43 - taobaohtc] Performing com.taobao.htc.Start activity launch  

  5. [2012-02-14 16:33:43 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao'  

  6. [2012-02-14 16:33:43 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'  

  7. [2012-02-14 16:33:44 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': Connection refused: connect  

  8. [2012-02-14 16:33:44 - taobaohtc] java.net.ConnectException: Connection refused: connect  

  9. [2012-02-14 16:33:44 - taobaohtc] Launch canceled!  

2、emulator: emulator window was out of view and was recentred

[html]

  1. [2012-02-20 14:54:10 - taobaohtc] ------------------------------  

  2. [2012-02-20 14:54:10 - taobaohtc] Android Launch!  

  3. [2012-02-20 14:54:10 - taobaohtc] adb is running normally.  

  4. [2012-02-20 14:54:10 - taobaohtc] Performing com.taobao.htc.Start activity launch  

  5. [2012-02-20 14:54:10 - taobaohtc] Automatic Target Mode: launching new emulator with compatible AVD 'taobao'  

  6. [2012-02-20 14:54:10 - taobaohtc] Launching a new emulator with Virtual Device 'taobao'  

  7. [2012-02-20 14:54:16 - Emulator] emulator: emulator window was out of view and was recentred  

  8. [2012-02-20 14:54:16 - Emulator]  

  9. [2012-02-20 14:54:16 - taobaohtc] New emulator found: emulator-5554  

  10. [2012-02-20 14:54:16 - taobaohtc] Waiting for HOME ('android.process.acore') to be launched...  

  11. [2012-02-20 14:54:16 - Emulator] Unknown savevm section type 95  

  12. [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.

[html]

  1. [2012-02-14 17:30:47 - taobaohtc] ------------------------------  

  2. [2012-02-14 17:30:47 - taobaohtc] Android Launch!  

  3. [2012-02-14 17:30:47 - taobaohtc] The connection to adb is down, and a severe error has occured.  

  4. [2012-02-14 17:30:47 - taobaohtc] You must restart adb and Eclipse.  

  5. [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

[html]

  1. [2012-02-16 11:11:55 - taobaohtc] ------------------------------  

  2. [2012-02-16 11:11:55 - taobaohtc] Android Launch!  

  3. [2012-02-16 11:11:55 - taobaohtc] adb is running normally.  

  4. [2012-02-16 11:11:55 - taobaohtc] Performing com.taobao.htc.Start activity launch  

  5. [2012-02-16 11:11:55 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao'  

  6. [2012-02-16 11:11:55 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'  

  7. [2012-02-16 11:12:01 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': timeout  

  8. [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!

[html]

  1. [2012-02-20 15:00:22 - taobaohtc] ------------------------------  

  2. [2012-02-20 15:00:22 - taobaohtc] Android Launch!  

  3. [2012-02-20 15:00:22 - taobaohtc] adb is running normally.  

  4. [2012-02-20 15:00:22 - taobaohtc] Performing com.taobao.htc.Start activity launch  

  5. [2012-02-20 15:00:22 - taobaohtc] Automatic Target Mode: launching new emulator with compatible AVD 'taobao'  

  6. [2012-02-20 15:00:22 - taobaohtc] Launching a new emulator with Virtual Device 'taobao'  

  7. [2012-02-20 15:00:25 - Emulator] WARNING: Data partition already in use. Changes will not persist!  

  8. [2012-02-20 15:00:25 - Emulator] WARNING: SD Card image already in use: C:\Documents and Settings\Administrator\.android\avd\taobao.avd/sdcard.img  

  9. [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]

  1. [2012-02-2411:22:15 - taobao] ------------------------------  

  2. [2012-02-2411:22:15 - taobao] Android Launch!  

  3. [2012-02-2411:22:15 - taobao] adb is running normally.  

  4. [2012-02-2411:22:15 - taobao] Performing com.taobao.htc.Start activity launch  

  5. [2012-02-2411:22:15 - taobao] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao'

  6. [2012-02-2411:22:15 - taobao] Uploading taobao.apk onto device 'emulator-5554'

  7. [2012-02-2411:22:17 - taobao] Installing taobao.apk...  

  8. [2012-02-2711:22:34 - taobao] Success!  

  9. [2012-02-2711:22:35 - taobao] Starting activity com.taobao.htc.Start on device emulator-5554

  10. [2012-02-2711:22:38 - taobao] Device not ready. Waiting 3 seconds before next attempt.  

  11. [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!

[java]

  1. [2012-03-0212:32:54 - Logcat]null

  2. com.android.ddmlib.TimeoutException  

  3.    at com.android.ddmlib.AdbHelper.read(AdbHelper.java:648)  

  4.    at com.android.ddmlib.AdbHelper.read(AdbHelper.java:616)  

  5.    at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:216)  

  6.    at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:378)  

  7.    at com.android.ddmlib.Device.executeShellCommand(Device.java:284)  

  8.    at com.android.ddmuilib.logcat.LogPanel$3.run(LogPanel.java:527)  

  9. [2012-03-0212:33:19 - DeviceMonitor]Sending jdwp tracking request failed!  

8、Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

[java]

  1. [2012-03-0311:20:58 - taobaohtc] ------------------------------  

  2. [2012-03-0311:20:58 - taobaohtc] Android Launch!  

  3. [2012-03-0311:20:58 - taobaohtc] adb is running normally.  

  4. [2012-03-0311:20:58 - taobaohtc] Performing com.taobao.htc.Start activity launch  

  5. [2012-03-0311:20:58 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'jinhua'

  6. [2012-03-0311:20:58 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'

  7. [2012-03-0311:21:00 - taobaohtc] Installing taobaohtc.apk...  

  8. [2012-03-0311:21:13 - taobaohtc] Success!  

  9. [2012-03-0311:21:14 - taobaohtc] Starting activity com.taobao.htc.Start on device emulator-5554

  10. [2012-03-0311:21:15 - taobaohtc] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.taobao.htc/.Start }  

  11. [2012-03-0311:21:17 - taobaohtc] Attempting to connect debugger to 'com.taobao.htc' on port 8634

  12. [2012-03-0311:21:19 - taobaohtc] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE  

  13. [2012-03-0311:21:19 - taobaohtc] Please check logcat output for more details.  

  14. [2012-03-0311:21:19 - taobaohtc] Launch canceled!  

9、java.io.IOException: EOF

[java]

  1. [2012-03-0515:05:28 - taobaohtc] ------------------------------  

  2. [2012-03-0515:05:28 - taobaohtc] Android Launch!  

  3. [2012-03-0515:05:28 - taobaohtc] adb is running normally.  

  4. [2012-03-0515:05:28 - taobaohtc] Performing com.taobao.htc.Start activity launch  

  5. [2012-03-0515:05:28 - taobaohtc] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'taobao'

  6. [2012-03-0515:05:28 - taobaohtc] Uploading taobaohtc.apk onto device 'emulator-5554'

  7. [2012-03-0515:05:30 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': EOF  

  8. [2012-03-0515:05:30 - taobaohtc] java.io.IOException: EOF  

  9. [2012-03-0515:05:30 - taobaohtc] Launch canceled!  

10、com.android.ddmlib.InstallException: device not found

[java]

  1. [2012-03-0909:24:31 - taobaohtc] Failed to install taobaohtc.apk on device 'emulator-5554': device not found    

  2. [2012-03-0909:24:31 - taobaohtc] com.android.ddmlib.InstallException: device not found    

  3. [2012-03-0909:24:31 - taobaohtc] Launch canceled!    

解决办法:

对上述报错,一般的处理方式是

1、关闭虚拟机,再重新Run应用。

 关闭虚拟机,直接在任务栏上右键点击虚拟机程序,在弹出菜单中左键点击“关闭”,等待虚拟机程序退出。

2、如果按第一点操作还是无法正常工作。需关闭虚拟机,退出Eclipse,并在任务管理器中结束“adb.exe”进程(如果有的话)。

按照上述办法操作,大多数Run应用,Console报的错误都可以得到解决。

转载地址:http://eulhl.baihongyu.com/

你可能感兴趣的文章
Windows启动配置数据(BCD)存储文件包含一些无效信息
查看>>
slim请求参数获取
查看>>
MySQL主从介绍 准备工作 配置主 配置从 测试主从同步
查看>>
hadoop2.4.1伪分布式环境搭建
查看>>
Java基础-字符串(String)常用方法
查看>>
CSS------当内容超出div宽度后自动换行和限制文字不超出div宽度和高度
查看>>
要恢复页面吗?Chrome未正确关闭
查看>>
iOS 性能优化总结
查看>>
hbs模板(zmaze ui用的)
查看>>
使用ASP.NET SignalR实现一个简单的聊天室
查看>>
8个试剂,其中一个有毒,最少多少只小白鼠能检测出有毒试剂——分而治之思想...
查看>>
Spring3.1 对Bean Validation规范的新支持(方法级别验证)
查看>>
fiddler script建议教程
查看>>
cocos 水果机,老Tiger虎机流水灯,博彩大转盘效果
查看>>
tmux不自动加载配置文件.tmux.conf
查看>>
C语言字节对齐 __align(),__attribute((aligned (n))),#pragma pack(n)【转】
查看>>
[Database] Redis 随笔
查看>>
3 ansible-playbook 条件语句-外部变量使用
查看>>
当一个线程进入一个对象的synchronized方法A之后,其他线程是否可进入此对象的synchronized方法B?...
查看>>
使用 nvm 管理不同版本的 node 与 npm
查看>>