DeviceMonitor Adb connection Error:远程主机强迫关闭了一个现有的连接 解决方法

本文主要解决adb connection error的问题——reset adb.

 

环境为真机测试,偶尔会报如下错误

Java代码   收藏代码
  1. [2012-04-24 20:41:34 - DeviceMonitor]Adb connection Error:远程主机强迫关闭了一个现有的连接。  
  2. [2012-04-24 20:41:36 - DeviceMonitor]Connection attempts: 1  
  3. [2012-04-24 20:41:38 - DeviceMonitor]Connection attempts: 2  
  4. [2012-04-24 20:41:40 - DeviceMonitor]Connection attempts: 3  
  5. [2012-04-24 20:41:42 - DeviceMonitor]Connection attempts: 4  
  6. [2012-04-24 20:41:44 - DeviceMonitor]Connection attempts: 5  
  7. [2012-04-24 20:41:46 - DeviceMonitor]Connection attempts: 6  
  8. [2012-04-24 20:41:48 - DeviceMonitor]Connection attempts: 7  
  9. [2012-04-24 20:41:50 - DeviceMonitor]Connection attempts: 8  
  10. [2012-04-24 20:41:52 - DeviceMonitor]Connection attempts: 9  
  11. [2012-04-24 20:41:54 - DeviceMonitor]Connection attempts: 10  
  12. [2012-04-24 20:41:56 - DeviceMonitor]Connection attempts: 11  
  13. [2012-04-24 20:44:06 - ddms]ADB rejected shell command (ls -l /): closed  
  14. [2012-04-24 20:44:11 - ddms]ADB rejected shell command (ls -l /): closed  

之前都是重启eclipse解决,但偶尔还解决不了。对于真机需要拔掉数据线,关闭eclipse重启,重新连接手机解决。 

 

但由于eclipse实在过于笨重,关闭重启时间过长。找到另外一种解决方法:

eclipse中视图模式选择DDMS(还有常见的java和debug视图), 显示Devices窗口,若无可通过选择window->show view->Devices显示,再选择下拉箭头中的reset adb

此时eclipse会再自动重试一次,输入Connection attempts:1即表示成功啦


http://trinea.iteye.com/blog/1497145

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值