How can I resolve “adb server is out of date” erro

2019-07-09 04:56发布

问题:

I understand that this question has been asked 1000 times but every answer I can find on Stackoverflow and other websites are all the same: Either (1) The user is using Genymotion, (2) the user is using HTC Sync in Windows.

I am doing neither. I am currently running in OS/X (10.11.6) and am using a Moto X (2nd gen) phone running Android 6.0.

Many times (not every time) when I run "adb logcat", I get

adb server is out of date.  killing...
* daemon started successfully *

This is a problem because I am trying to run some automated tests using gradlew (since using "adb shell am instrument" doesn't produce the JUnit style report I need) and collect logs... but every time I start "adb logcat", something in gradlew (apparently) tries to startup adb, which then kills all running instances of adb.

Has anyone seen this problem without using Genymotion/HTCSync/Windows and knows a solution?

Thanks!

回答1:

The root cause of the server is out of date issue is still the same regardless the OS and/or other software used - you have multiple copies of adb binary in your system. And the solution is also the same:

  • kill all running adb processes
  • make sure you have the only copy of adb (remove the duplicates)
  • update it to the latest version
  • reconfigure all your software packages to use that copy


回答2:

Just check that every tool you use is using the same adb version. For example, delete all versions except the latest.



回答3:

Please check all your environmental paths which ADB has. Your system may have several ADB.exe files so that mismatches makes the issue.