码迷,mamicode.com
首页 > 移动开发 > 详细

[Android]The connection to adb is down, and a severe error has occured.

时间:2016-03-08 16:42:02      阅读:179      评论:0      收藏:0      [点我收藏+]

标签:

在Android开发时,有时我们开启虚拟机执行程序时。会报类似下面错误:

[2015-07-19 15:08:29 - TestXiaoYanLibrary] The connection to adb is down, and a severe error has occured.
[2015-07-19 15:08:29 - TestXiaoYanLibrary] You must restart adb and Eclipse.
[2015-07-19 15:08:29 - TestXiaoYanLibrary] Please ensure that adb is correctly located at ‘G:\eclipse\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe‘ and can be executed.

去百度了一下,可能是下面的情况:

a:模拟器不稳定。有时须要又一次部署环境,甚至有时须要又一次建立模拟器和新建个avd。

b:可能是默认port被占用,在cmd中键入netstat查看。关掉有冲突的port程序,或者设置新的port。

 

c:将platform-tools文件夹和tools文件夹加到Path环境变量中。 

d:将Eclipse进入DDMS模式,重新启动ADB 和Eclipse。

解决方式:

(1)普通情况都不须要太麻烦。直接切换到DDMS页面,选择reset adb就可以。

技术分享


(2)若经过第一个步骤,还是不行的话,运行一下操作:(在win7中的操作)

启动任务管理器-->进程页面-->寻找并选中adb.exe进程-->结束该进程-->再进行第一步的操作

技术分享

(3)若发现虚拟机的状态不是在线(online),就把它关闭,重新启动打开,就可以。

[Android]The connection to adb is down, and a severe error has occured.

标签:

原文地址:http://www.cnblogs.com/bhlsheji/p/5254308.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!