[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/)
總結
以上是生活随笔為你收集整理的[Android] The connection to adb is down, and a severe error has occured的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C# 系统应用之鼠标模拟技术及自动操作鼠
- 下一篇: [Android] 拍照、截图、保存并显