Solving "adb server version doesn't match this client" error
AndroidAdbAppiumAndroid 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:
- going into GenyMotion settings -> ADB tab,
- 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
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:
-
Firstly disconnect device/emulator.
-
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:
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 ):
- Open task manager
- Go to processes and select the ADB.EXE
- Right-click on it and check the properties
- Most likely you will see a different path from where the adb.exe is running ( either HTC manager, Genymotion, etc )
- Kill the process
- 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:
- The location where I manually downloaded it from google
- 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:
-
adb kill-server
-
Close all
chrome://inspect/#devices
windows/tabs -
adb start-server
-
adb devices
Solution 13 - Android
- adb kill-server
- 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.
- 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.