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

简介:

一.ADB server didn't ACK
在配置完Android环境后,运行第一个程序时,遇到了如下错误:
        ADB server didn't ACK
        * failed to start daemon *
它可能的原因是端口5037被占用,需要查找占用5037(Android默认)端口的PID,在cmd中输入:
        netstat -ano | findstr "5037"
输出进程:
        TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       9292  
        TCP    127.0.0.1:5037         127.0.0.1:49422        ESTABLISHED     9292  
        TCP    127.0.0.1:49422        127.0.0.1:5037         ESTABLISHED     3840
此时把该进程“9292”结束,代码如下:
       
TASKLIST | findstr "9292"
二.The connection to adb is down, and a severe error has occured
在执行上面的结果后可能还会遇到一个错误,经常出现的错误:
        The connection to adb is down, and a severe error has occured.
        You must restart adb and Eclipse.
        Please ensure that adb is correctly located at 'D:\..\platform-tools\adb.exe' and can be executed.
如下图所示:

解决方法是在cmd中调用adb kill-server,再调用adb start-server
开启服务.但是可能会出现错误:
        adb server is out of date.  killing... 
        ADB server didn't ACK 
        * failed to start daemon *

这是因为端口号被占用,查看豌豆荚或手机助手占用端口号,将kadb\qadb
进程关闭.
具体方法如下:
1.先将Eclipse和豌豆荚关掉,
同时结束进程kadb.

2.使用cd去到platform-tools文件夹下(含有adb.exe),并开启adb服务如我的指令是:
       G:
       cd
G:\software\Program software\Android\adt-bundle-windows-x86_64-20140321\sdk\platform-tools
       
adb start-server
成功时输出:
        * daemon not running.Starting it now on port 11888*
        * daemon started successfully *

最后点击platform-tools文件夹中adb.exe应用程序,
再运行程序即可.
注意上面的程序上面的程序输出端口号为11888,如果你的还是不成功,可以修改环境的端口号,如下:

修改端口号再按上面的步骤实现即可.这是配置Android+Eclipse的错误解决方案,希望对你有用~
(By:Eastmount 2014-10-20 夜2点
http://blog.csdn.net/eastmount/)

相关实践学习
使用CLup和iSCSI共享盘快速体验PolarDB for PostgtreSQL
在Clup云管控平台中快速体验创建与管理在iSCSI共享盘上的PolarDB for PostgtreSQL。
AnalyticDB PostgreSQL 企业智能数据中台:一站式管理数据服务资产
企业在数据仓库之上可构建丰富的数据服务用以支持数据应用及业务场景;ADB PG推出全新企业智能数据平台,用以帮助用户一站式的管理企业数据服务资产,包括创建, 管理,探索, 监控等; 助力企业在现有平台之上快速构建起数据服务资产体系
目录
相关文章
|
21天前
|
Android开发 开发者
Error:Could not find com.android.support:appcompat-v7:27.0.2.
Error:Could not find com.android.support:appcompat-v7:27.0.2.
15 0
|
3月前
|
Android开发 Python
Python封装ADB获取Android设备wifi地址的方法
Python封装ADB获取Android设备wifi地址的方法
61 0
|
2月前
|
Android开发
【Bug】Android resource linking failed和error: failed linking references.
【Bug】Android resource linking failed和error: failed linking references.
|
10天前
|
Android开发 开发者
安卓投屏神器 Scrcpy安 报错ERROR: Could not find any ADB device
使用Scrcpy安卓投屏工具时遇到报错,问题根源是未开启开发者模式。解决步骤:进入设置,点击【关于手机】→连续点击版本号激活开发者模式,然后在【系统设置】→【开发者选项】中开启USB调试。参照此方法后可正常执行。Scrcpy软件下载链接和GitHub页面也已提供。
21 1
|
21天前
解决Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com
解决Error:All flavors must now belong to a named flavor dimension. Learn more at https://d.android.com
21 5
|
1月前
|
Shell 开发工具 Android开发
ADB 下载、安装及使用教程:让你更好地管理 Android 设备
ADB 下载、安装及使用教程:让你更好地管理 Android 设备
459 2
|
4月前
|
网络协议 Android开发 虚拟化
Android Studio无法运行程序调试程序出现Unable to connect to ADB.Check the Event Log for possible issues.Verify th
Android Studio无法运行程序调试程序出现Unable to connect to ADB.Check the Event Log for possible issues.Verify th
59 0
Android Studio无法运行程序调试程序出现Unable to connect to ADB.Check the Event Log for possible issues.Verify th
|
5月前
|
Android开发
[√]Android 通过adb内存监测方法
[√]Android 通过adb内存监测方法
122 1
|
21天前
|
Java Android开发
Android 开发获取通知栏权限时会出现两个应用图标
Android 开发获取通知栏权限时会出现两个应用图标
12 0
|
1月前
|
XML 缓存 Android开发
Android开发,使用kotlin学习多媒体功能(详细)
Android开发,使用kotlin学习多媒体功能(详细)
97 0