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

Posted phlsheji

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Android]The connection to adb is down, and a severe error has occured.相关的知识,希望对你有一定的参考价值。

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.的主要内容,如果未能解决你的问题,请参考以下文章

Nagios-报错:UNKNOWN Can't connect to the JVM:

Can't connect to X11 window server using ':1.0' as the value of the DISPLAY variable.(示例

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

MetaException(message:For direct MetaStore DB connections, we don't support retries at the clien

VS2017 + VS Android Emulator Could not connect to the debugger 解决方法

CentOS8安装pycharm报错Can't connect to X11 window server using ':0' as the value of the DIS(