Genymotion adb debug command error

问题

Genymotion After installing the application, when using the adb command, the error is as follows:

adb server is out of date.  killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:

问题因

1. Call the adb version of the adb command and android/sdk The directory adb version under /platform-tools is inconsistent.

举例: My system is windows system, directly call adb version :

adb  version

The result is as follows: adb version is 1.0.31

Android Debug Bridge version 1.0.31

and then enter the sdk path of Android Studio configuration. For example:

这里写图片描述

Enter D:\sdk\platform-tools Directory to execute the following command:

D:\sdk\platform-tools\adb.exe  version

The result is as follows:

Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as D:\sdk\platform-tools\adb.exe

We see that the two versions of adb are inconsistent, the problem is here.

问题分析

First genymotion The configured sdk path should be consistent with the Android Studio SDK path, as shown below:

这里写图片描述

Detect your environment variables at the same time (your environment variable is configured with multiple adb paths) When the command line is called, the wrong version of adb is called.
Take the problem I encountered as an example:
Open EveryThing (a file search software under windows platform) Search for adb.exe,
这里写图片描述

found a suspicious adb.exe c:\Windows.
Execution

 C:\Windows\adb.exe  version

The result is as follows:

Android Debug Bridge version 1.0.31 

罪魁祸 Here, I deleted the adb.exe directly and configured D:\sdk to the environment variable. Execute again: adb version
The result is as follows:

Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as D:\sdk\platform-tools\adb.exe

总结

Most blogs in China only mention the configuration of the Genymotion sdk path, there is no mention of the adb version conflict. Still Stack Overflow is easy to use.

参考链接