[Android] The connection to adb is down, and a severe error has occured
一.ADB server didn't ACK
在配置完Android環(huán)境后,運(yùn)行第一個(gè)程序時(shí),遇到了如下錯(cuò)誤:
??????? ADB server didn't ACK
??????? * failed to start daemon *
它可能的原因是端口5037被占用,需要查找占用5037(Android默認(rèn))端口的PID,在cmd中輸入:
??????? netstat?-ano?|?findstr?"5037"
輸出進(jìn)程:
??????? 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
此時(shí)把該進(jìn)程“9292”結(jié)束,代碼如下:
??????? TASKLIST | findstr "9292"
二.The connection to adb is down, and a severe error has occured
在執(zhí)行上面的結(jié)果后可能還會(huì)遇到一個(gè)錯(cuò)誤,經(jīng)常出現(xiàn)的錯(cuò)誤:
??????? 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中調(diào)用adb kill-server,再調(diào)用adb start-server開啟服務(wù).但是可能會(huì)出現(xiàn)錯(cuò)誤:
??????? adb?server?is?out?of?date.??killing...?
??????? ADB?server?didn't?ACK?
??????? *?failed?to?start?daemon?*
這是因?yàn)槎丝谔柋徽加?查看豌豆莢或手機(jī)助手占用端口號,將kadb\qadb進(jìn)程關(guān)閉.
具體方法如下:
1.先將Eclipse和豌豆莢關(guān)掉,同時(shí)結(jié)束進(jìn)程kadb.
2.使用cd去到platform-tools文件夾下(含有adb.exe),并開啟adb服務(wù)如我的指令是:
?????? G:
???????cd G:\software\Program software\Android\adt-bundle-windows-x86_64-20140321\sdk\platform-tools
??????? adb start-server
成功時(shí)輸出:
??????? * daemon not running.Starting it now on port 11888*
??????? * daemon started successfully *
?
最后點(diǎn)擊platform-tools文件夾中adb.exe應(yīng)用程序,再運(yùn)行程序即可.
注意上面的程序上面的程序輸出端口號為11888,如果你的還是不成功,可以修改環(huán)境的端口號,如下:
修改端口號再按上面的步驟實(shí)現(xiàn)即可.這是配置Android+Eclipse的錯(cuò)誤解決方案,希望對你有用~
(By:Eastmount 2014-10-20 夜2點(diǎn) http://blog.csdn.net/eastmount/)
總結(jié)
以上是生活随笔為你收集整理的[Android] The connection to adb is down, and a severe error has occured的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C# 系统应用之鼠标模拟技术及自动操作鼠
- 下一篇: [Android] 拍照、截图、保存并显