adb server version doesn't match this client

后端 未结 30 2424
隐瞒了意图╮
隐瞒了意图╮ 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:22

    Unfortunately I do not have enough reputation to comment yet. But the response marked as an answer sent me in the right direction.

    I did not see anything in my path related to HTC Sync Manager, though I had it installed. I'm not working with my HTC device at the moment, and only had the sync manager installed to help with driver issues. Once uninstalling the HTC sync manager this issue went away for me.

    Hope this helps someone else.

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

    I uninstalled Dell PC Suite and HTC Sync from my computer and this problem went away.

    EDIT: To elaborate a bit on the cause of this problem: HTC sync comes with an ADB server of its own. And it updates your PATH environment variable to point to its version of the server. Edit the PATH variable and remove the reference to the HTC Sync directories. Now you're using Google's ADB again.

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

    In my case, the problem was caused by Virtuous Ten Studio, which has the adb.exe in External/ADB directory.

    Go there and run .\adb.exe kill-server and you'll be good.

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

    It would appear that the ADB daemon on the device (adbd) is disagreeing with the ADB server process on your host computer as to which version of the protocol they are speaking. Which version of the SDK are you running and what is the OS version on the device you are debugging?

    What you might need to do is actually downgrade your version of the SDK tools so that the ADB daemon and process are in agreement. I thought the server process was completely backward compatible, but this could be one of those corner cases where it doesn't. Google doesn't advertise the fact that you can get their old SDK tools packages, but they can be found by looking in the archives area at http://developer.android.com.

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

    I had this issue on one of my development machines (all run windows 7 x64) while all other machines' adb work normally. The reason I ran into this issue is I have an old version of adb.exe reside in %android-sdk%\tools while newer Android SDKs have adb.exe under %android-sdk%\platform-tools

    remove the older adb.exe from %android-sdk%\tools and add %android-sdk%\platform-tools to %PATH% solves this issue

    or more generally, hunt down any adb executable in your path that are out of date, just use the latest one provided with Android SDK

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

    Ensure that there are no other adb processes running

    There may be more than one adb process running on the system. Tools such as the Android Reverse Tether may use their own version of the adb tool, hence the version in memory may conflict with the version run from the command line (via the path variable).

    Windows

    In Windows, press CTL+Shift+ESC to access Task Manager, sort in the Image Name column, then kill all instances of adb.exe by right-clicking, and choosing End Process. Note that there are multiple instances of adb.exe below:

    Multiple adb.exe instances - how to kill

    Linux (Android)

    In a Linux environment, just use the kill -9 command. Something like this worked on an Android device running adb (use ps output, search using grep for a process starting with adb, get the Process ID from the adb process(es), and send that ID to the kill -9 command):

    kill -9  $(ps  | grep "S adb" | busybox awk '{print $2}')
    

    Then, restart adb

    Once the adb processes - and thus conflicts - are resolved, then retry running adb from the command-line again:

    adb start-server
    
    0 讨论(0)
提交回复
热议问题