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

來源:互聯網
上載者:User

標籤:android   adb is down   eclipse   配置環境   

一.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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.