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

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

 

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

[2012-04-24 20:41:34 - DeviceMonitor]Adb connection Error:远程主机强迫关闭了一个现有的连接。
[2012-04-24 20:41:36 - DeviceMonitor]Connection attempts: 1
[2012-04-24 20:41:38 - DeviceMonitor]Connection attempts: 2
[2012-04-24 20:41:40 - DeviceMonitor]Connection attempts: 3
[2012-04-24 20:41:42 - DeviceMonitor]Connection attempts: 4
[2012-04-24 20:41:44 - DeviceMonitor]Connection attempts: 5
[2012-04-24 20:41:46 - DeviceMonitor]Connection attempts: 6
[2012-04-24 20:41:48 - DeviceMonitor]Connection attempts: 7
[2012-04-24 20:41:50 - DeviceMonitor]Connection attempts: 8
[2012-04-24 20:41:52 - DeviceMonitor]Connection attempts: 9
[2012-04-24 20:41:54 - DeviceMonitor]Connection attempts: 10
[2012-04-24 20:41:56 - DeviceMonitor]Connection attempts: 11
[2012-04-24 20:44:06 - ddms]ADB rejected shell command (ls -l /): closed
[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即表示成功啦

 

你可能还感兴趣:

Android公共库(缓存 下拉ListView 下载管理Pro 静默安装 root运行 Java公共类)

Android ImageCache图片缓存

Android系统下载管理DownloadManager功能介绍及使用示例

下拉刷新及滚动到底部加载更多的Listview使用

viewpager实现画廊(一屏多个Fragment)效果

Android APK root权限静默安装

写在前面, 自己搭博客why and target

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值