Please ensure that adb is correctly located at……問題

遇到問題描述:android

運行android程序控制臺輸出windows

    [2013-10-13 16:45:50 - ] The connection to adb is down, and a severe error has occured.
    [2013-10-1316:45:50 - ] You must restart adb and Eclipse.
    [2013-10-1316:45:50 - ] Please ensure that adb is correctly located at '<--此處顯示adb.exe的全路徑-->' and can be executed.eclipse

 

  問題分析1spa

關閉eclipse,打開windows任務管理器,查看進程中是否有adb.exe或adb.exe *32。rest

  解決方案1orm

若是有則關閉該進程,從新啓動eclipse便可;server

  問題分析2:進程

windows任務管理器中就找不到adb.exe或adb.exe *32的進程,能夠嘗試手動啓動adb.exe ;若是手動啓動後還找不到adb.exe進程,則    只有一種可能就是adb.exe進程的端口被佔用,致使adb.exe未能正常啓動所致(adb默認端口爲5037)。ip

  解決方案2:android-sdk

                   一、查看端口使用狀況:

                   netstat -aon|findstr "5037"

                    TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       5004

                    二、發現5004佔用5037端口,查看5004的task:

                    tasklist|findstr "5004"

                    wandoujia_daemon.exe          5004 Console                    1      4,276 K

                    打開windows管理器結束wandoujia_daemon.exe該進程,啓動eclipse,若是adb.exe未能啓動,手動啓動便可;

對了我這邊每次打開Eclpise的時候,模擬器都會報這個錯

Please ensure that adb is correctly located at 'C:\android-sdk-windows\platform-tools\adb.exe' and can be executed. ",每次解決的方法:關掉模擬器和Eclipse,找到上面的那個路徑雙擊點開abd.exe,而後在打開Eclipse,而後打開模擬器就行了。

還有總是又出現這種情況,重啓Eclipse,關閉全部adb.exe都很差用,今天又找到一種辦法

解決方案3:

1.先把eclipse關閉.
2.在管理器轉到你的android SDK 的platform-tools下, 如圖:

3.鍵入adb kill-server ,若是adb關閉了會提示 server not running *

4.再輸入 adb start-server  若是不成功會提示 daemon not running. starting it now on port  ***的

   而若是成功的話不提示任何語句的.這時再從新打開eclipse就能夠正常運行模擬器的了.

相關文章
相關標籤/搜索