ADB server version (36) doesn't match this cli

2020-01-24 20:22发布

After installing the Android O preview on a test device my ADB stopped working and started giving me this error.

adb server version (36) doesn't match this client (39); killing... adb E 03-27 08:01:55 2925 147690 usb_osx.cpp:333] Could not open interface: e00002c5 adb E 03-27 08:01:55 2925 147690 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

The only answers I have come across on this issue referred to Genymotion being out of sync with ADB but I don’t use Genymotion. Any help would be greatly appreciated. I have already wiped and reinstalled Android Studio as well as all of its tools and settings yet seem to still have this issue.

标签: android adb
9条回答
Animai°情兽
2楼-- · 2020-01-24 21:04

I had the same error. In my case, using Appium, I had two versions of ADB

$ /usr/local/bin/adb version 36

and

$ /Users/user/Library/Android/sdk/platform-tools/adb version 39

The solution was:

  1. be sure that your $PATH in bash_profile is pointing to: /Users/user/Library/Android/sdk/platform-tools/

  2. stop the adb server: adb kill-server and check Appium is stopped.

  3. delete the adb version 36 (or you can rename it to have a backup): rm /usr/local/bin/adb

  4. start adb server: adb start-server or just starting Appium

查看更多
混吃等死
3楼-- · 2020-01-24 21:05

As mentioned by others here, that you could have two adb's running ... And to add to these answers from a Linux box perspective ( for the next newbie who is working from Linux );

  1. Uninstall your distro's android-tools ( use zypper or yum etc )

    # zypper -v rm android-tools
    
  2. Find where your other adb is

    # find /home -iname "*adb"|grep -i android
    

    Say it was at ;

    /home/developer/Android/Sdk/platform-tools/adb

  3. Then Make a softlink to it in the /usr/bin folder

     ln -s /home/developer/Android/Sdk/platform-tools/adb  /usr/bin/adb
    
  4. Then;

     # adb start-server
    
查看更多
smile是对你的礼貌
4楼-- · 2020-01-24 21:08

In my case this error occured when I set up my environment adb path as ~/.android-sdk/platform-tools (which happens when e.g. android-platform-tools is installed via homebrew), which version was 36, but Android Studio project has Android SDK next path ~/Library/Android/sdk which adb version was 39.

I have changed my PATH to platform-tools to ~/Library/Android/sdk/platform-tools and error was solved

查看更多
Anthone
5楼-- · 2020-01-24 21:09

This works for me...

  • go to GenyMotion settings -> ADB tab
  • instead of Use Genymotion Android tools, choose custom Android SDK Tools and then browse your installed SDK.
查看更多
贼婆χ
6楼-- · 2020-01-24 21:09

I think you have multiple adb server running, genymotion could be one of them, but also Xamarin - Visual studio for mac OS could be running an adb server, closing Visual studio worked for me

查看更多
萌系小妹纸
7楼-- · 2020-01-24 21:11

You have two versions of ADB $ /usr/local/bin/adb version Android Debug Bridge version 1.0.36 Revision 0e9850346394-android

$ /Users/user/Library/Android/sdk/platform-tools/adb version Android Debug Bridge version 1.0.39 Revision 3db08f2c6889-android

You could see which one your PATH is pointing to (echo $PATH) but I fixed it with a adb stop-server on one version and a adb start-server on the other.

查看更多
登录 后发表回答