adb連真機報錯

adb連真機報錯:

adb server version (32) doesn’t match this client (39); killing…error: could not install smartsocket listener: cannot bind to 127.0.0.1:5037: 通常每個套接字地址(協議/網絡地址/端口)只允許使用一次。 (10048)

C:\WINDOWS\system32>adb connect 127.0.0.1
adb server version (32) doesn't match this client (39); killing...
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: 通常每個套接字地址(協議/網絡地址/端口)只允許使用一次。 (10048)
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon

問題主要是adb的版本和服務器的版本不匹配的問題,使用命令:

adb nodaemon server -a,設置不啓動守護進程

C:\WINDOWS\system32>adb nodaemon server -a

然後再查看adb連接的設備就可以了:

C:\WINDOWS\system32>adb devices
List of devices attached
2181d47f        device

如果還遇到5037端口被佔用的問題,就找出進程號用taskkill命令殺死該進程即可
1、查找5037端口對應的進程:netstat -ano|findstr 5037
2、殺死該進程:taskkill /F /PID pid

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章