解決方法:就是找到誰佔用了一個端口,然後把該程序關掉。
1、打開cmd窗口,進入adb所在的目錄
2、netstat -aon|findstr "5037"
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 9212
發現9212佔用了 5037端口,繼續輸入tasklist|findstr "5456"命令查看9212的task
發現是hwtransport.exe.如下所示
hwtransport.exe 9212 Console 1 8,100 K
接下來問題就好解決了,在任務管理器kill掉hwtransport.exe
執行adb shell,搞定