1. 程式人生 > >adb server version (31) doesn't match this client (39);

adb server version (31) doesn't match this client (39);

問題描述

手機可以連線電腦 但是執行adb devices (檢視Android 裝置)提示adb停止執行
這裡寫圖片描述
視窗顯示:
adb server version (31) doesn’t match this client (39);
其實這段話代表的是adb 版本不一致導致。

 adb devices
List of devices attached
adb server version (36) doesn't match this client (39); killing...
adb E 08-01 11:51:28 16094 1798575 usb_osx.cpp:333
] Could not open interface: e00002c5 adb E 08-01 11:51:28 16094 1798575 usb_osx.cpp:294] Could not find device interface error: could not install *smartsocket* listener: Address already in use ADB server didn't ACK * failed to start daemon * error: cannot connect to daemon

原因總結

網上的總結有:
1.開了模擬器Genymotion
genymotion中的adb命令被佔用衝突了(往往是被360手機助手佔用了adb的埠所致),直接開啟genymotion的Setting,切換到第四個標籤頁(ADB),選擇Use custom Android Sdk tools,然後選擇我們開發使用的Sdk路徑即可。

2.Chrome除錯webview佔用了埠
Close all chrome://inspect/#devices windows/tabs

但是我的問題是:genymotion的adb版本和Android studio中版本不一致導致。原因是我解除安裝了genymotion但是我沒有重啟電腦而爆出來得異常。搞了一個小時,最後重啟了一下電腦才好了。

參考:https://blog.csdn.net/danhantao/article/details/76519026