最近用的三星手機突然連不上Android Studio了,上網查看有兩種解決辦法
1、使用cmd命令
連不上手機時先查看端口是否能被綁定,使用cmd命令
adb nodaemon server
如果提示:
cannot bind 'tcp:5037'
是端口綁定失敗,則繼續查看到底是哪個端口給占用了
運行命令:netstat -ano | findstr "5037"
結果輸出:
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 8744
TCP 127.0.0.1:5037 127.0.0.1:51531 ESTABLISHED 8744
TCP 127.0.0.1:5037 127.0.0.1:52082 TIME_WAIT 0
...
說明當前端口被pid為8744的進程占用,運行tasklist 查看列表pid為8744的進程
或者直接運行taskkill /pid 8744 或者taskkill /im xxxx.exe
2、下載google android 設備usb驅動程序
https://developer.android.com/studio/run/win-usb.html
最后我使用第二種方法搞定了。。