[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/)

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Eastmount

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值