Solving "adb server version doesn't match this client" error

AndroidAdbAppium

Android Problem Overview


I'm running my Appium script with Python instead of py.test because py.test does not play nicely with variables I want to get from a text file. When I run my script with Python everything works except that my first method always has an error.

Does anyone know how to fix the following error?

adb server version (31) doesn't match this client (36)
adb server version (32) doesn't match this client (36); killing...

Android Solutions


Solution 1 - Android

I fixed this by doing the following:

  1. going into GenyMotion settings -> ADB tab,
  2. instead of Use Genymotion Android tools (default), I chose Use custom Android SDK Tools and then browsed to my installed SDK.

Solution 2 - Android

In my case the solution was this on an Ubuntu based OS:

adb kill-server
sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb
sudo chmod +x /usr/bin/adb
adb start-server

kudos: https://stackoverflow.com/a/38166059/3765109

Solution 3 - Android

One possible reason for the occurrence of this error is due to the difference in adb versions in the development machine and the connected connected device/emulator being used for debugging.

So resolution is:

  1. Firstly disconnect device/emulator.

  2. Run on terminal/command prompt following commands:

     adb kill-server
     adb start-server
    

This will start the adb successfully. Now you can connect device. Hope it helps.

Solution 4 - Android

It seems there are 2 adb version in your system. Please find them out and keep the adb in your Android SDK folder only, delete all others folders that including adb file. You can find out which adb you are using from Application Monitor:

enter image description here

It might be a problem if the adb is not the one in you Android SDK folder.

In my case, I found I was running adb from here: > /Library/Application Support/RSupport/Mobizen2

after deleting the Mobizen2 folder, then all adb commands work fine.

Solution 5 - Android

Exactly same problem. Tried kill and start but what this worked for me:

adb reconnect

Hope it helps.

Solution 6 - Android

For anyone still having this issue ( on windows ):

  1. Open task manager
  2. Go to processes and select the ADB.EXE
  3. Right-click on it and check the properties
  4. Most likely you will see a different path from where the adb.exe is running ( either HTC manager, Genymotion, etc )
  5. Kill the process
  6. Run ADB.exe from your android studio path ( in my case: C:\Users%user%\AppData\Local\Android\sdk\platform-tools )

This solved the problem in my case.

Solution 7 - Android

Most likely you have several adb version on your computer. You start adb server using one version and then trying to connect to this server using another version. For example - Genymotion has it's own adb and if you start Genymotion emulator and then try to use adb from Android SDK most likely you will have such error (the latest Genymotion which is 2.7.2 has adb version 1.0.32 while the latest Android SDK has adb version 1.0.36).

Solution 8 - Android

On Windows, just check in the windows task manager if there are any other adb processes running.

Or run adb kill-server

If yes, just kill it & then perform the adb start-server command.

I hope, it should solve the problem.

Solution 9 - Android

For those of you that have HTC Sync installed, uninstalling the application fixed this problem for me.

Solution 10 - Android

For me it was happening because I had android tools installed in two places:

  1. The location where I manually downloaded it from google
  2. Automatic download by Android studio

What I was able to do was completely delete the folder in #1 and point my bash profile and all other references to the location where Android studio installed it for me: /Users/my_user_name/Library/Android/sdk

This solved it.

Solution 11 - Android

I had same problem since updated platfrom-tool to version 24 and not sure for root cause...(current adb version is 1.0.36)

Also try adb kill-server and adb start-server but problem still happened

but when I downgrade adb version to 1.0.32 everything work will

Solution 12 - Android

What worked for me:

  1. adb kill-server

  2. Close all chrome://inspect/#devices windows/tabs

  3. adb start-server

  4. adb devices

Solution 13 - Android

  1. adb kill-server
  2. close any pc side application you are using for manage the android phone, e.g. 360mobile(360手机助手). you might need to end them in task manager in necessary.
  3. adb start-server and it should be solved

Solution 14 - Android

Mainly you need to delete duplicate adb.exe file. You can use Everything to Find.

keep the platform-tools adb.exe

and add the platform-tools directory to your Environment Path Variable.

I am using Memu Emulator.

So, I have taken these steps:

Go to Memu Installation Directory: (In My Case D:\Program Files\Microvirt\MEmu)

And then Delete the adb.exe file.

It should work fine for you.

Solution 15 - Android

This issue for me was caused by having apowermirror running at the same time, from what I can tell any software that could use a different version of adb could cause these issues as others mention in this thread this can include Genymotion or from other threads unreal studio was the problem.

Solution 16 - Android

If you are using android studio then give it a try:

Remove and path variable of adb from system variable/user variable. Then go to terminal of android studio and then type there command adb start-service.

I tried this and it worked for me.

Solution 17 - Android

I've recently had this issue too and after none of the answers on here worked I realised that the APK I was testing against would have been built against the latest sdk.

So I went into the Appium settings and changed the platform version to the latest version and this resolved the issue for me.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDevBrandonJView Question on Stackoverflow
Solution 1 - AndroidtarrantView Answer on Stackoverflow
Solution 2 - AndroidefkanView Answer on Stackoverflow
Solution 3 - AndroidNapoleanView Answer on Stackoverflow
Solution 4 - AndroidDàChúnView Answer on Stackoverflow
Solution 5 - AndroidShah Rukh QasimView Answer on Stackoverflow
Solution 6 - AndroidCatalinView Answer on Stackoverflow
Solution 7 - Androiduser1991679View Answer on Stackoverflow
Solution 8 - AndroidDeepak VermaView Answer on Stackoverflow
Solution 9 - AndroidmoosexpressView Answer on Stackoverflow
Solution 10 - AndroidHRVHackersView Answer on Stackoverflow
Solution 11 - AndroidcanyuView Answer on Stackoverflow
Solution 12 - AndroidMikelView Answer on Stackoverflow
Solution 13 - Androiduser3149620View Answer on Stackoverflow
Solution 14 - AndroidRiajulView Answer on Stackoverflow
Solution 15 - AndroidCHurstView Answer on Stackoverflow
Solution 16 - AndroidAmitView Answer on Stackoverflow
Solution 17 - AndroidChristian BarronView Answer on Stackoverflow