adb server version doesn't match this client

后端 未结 30 2444
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 09:49

Whenever I try to run adb devices:

            $ adb devices
            * daemon not running. starting it now *
            * daemon started su         


        
相关标签:
30条回答
  • 2020-11-22 10:29

    I have seen the following error twice in the past week or so:

    adb server version (40) doesn't match this client (41)
    

    I fixed it by rebooting my PC every time. I do not know how to explain it.

    I tried killing and starting adb via command line multiple timea, restarting Android Studio multiple times to no avail. Task Manager does not show adb.exe.

    I am running Android Studio 3.4 on Windows 10 (V1809, Build:17763.503)

    Edit (2019-05-30): When this happened for the 3rd time, I closed all applications, then restarted Android Studio, and the problem was solved. It seems that another application causes this. I will report back once I find the culprit.

    Edit (2019-05-30): I have finally found the culprit - Visual Studio paired with a Macbook Pro for building and debugging an iOS app. Once VS is closed or the pairding is disabled, adb becomes normal.

    0 讨论(0)
  • 2020-11-22 10:30

    I beat my head against the wall on this one. This started happening when I installed the latest version of HTC sync (3.0.5579). For some reason adb.exe was showing up multiple times in the task manager and I was getting the adb server is out of date killing errors multiple times. I found the adb.exe version in the HTC sync directory and the Android SDK platform-tools directory. I had the path setup correctly pointing at the android SDK directory and didn't see the HTC Sync path (maybe I was missing something, but I don't think so). Anyway, to fix the issue, I simply renamed the adb.exe file in the HTC Sync directory and everything worked again. This may not be the right way to go about this fix, but it worked for me.

    0 讨论(0)
  • 2020-11-22 10:31

    Try this:

    1. Close the Eclipse application.

    2. adb kill-server

    3. Restart Eclipse.

    0 讨论(0)
  • 2020-11-22 10:32

    I just exited HTC Sync, tried again, and it worked. Notice: Phone went black(locked), I just turned it on, and there was my application running. :)

    0 讨论(0)
  • 2020-11-22 10:33

    I went through all the answers on SO and it didn't work for me. When I killed the adb.exe process from Task Manager, it kept reopening it and the reason was that Droid Explorer was working in the background.

    Killing the DE process via Task Manager and then killing adb.exe (and running it again from the console through 'adb start-server' worked for me.

    This can be useful for many people who have rooted their devices.

    0 讨论(0)
  • 2020-11-22 10:36

    This is caused because you are running a adb other than the one included in the SDK. If on linux check where is the adb binary located

    which adb
    Expected Output : ANDROID_SDK/platform-tools/adb
    

    If not pointing to ANDROID_SDK/platform-tools/adb then you are running some old version of adb installed on a different location on the machine.

    Nothing wrong running adb other than the one provided with SDK but the downside is it is not updated automatically when the android SDK is updated and that's why you running into this out-dated version issue.

    The easier fix and to avoid this issue in future rename the older (misleading) adb binary file to something else.

    Follow the steps to resolve this issue.

    $ which adb
    *o/p /usr/bin/adb  -   (output will depend on your machine)*
    $ cd /usr/bin/
    $ ls -lt | grep adb
    *o/p -rwxr-xr-x 1 root   root      160912 Mar 31  2016 adb*
    $ sudo mv adb adb_bakup
    $ ls -lt | grep adb
    o/p -rwxr-xr-x 1 root   root      160912 Mar 31  2016 adb_bakup
    $ export PATH="/path/to/android_sdk/platform-tools:$PATH"
    $ which adb  
    *o/p <your android sdk dir>/platform-tools/adb*   ---> You are all good now
    
    0 讨论(0)
提交回复
热议问题