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...
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.
For those of you that have HTC Sync installed, uninstalling the application fixed this problem for me.
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.
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
For anyone still having this issue ( on windows ):
This solved the problem in my case.
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.
What worked for me:
adb kill-server
chrome://inspect/#devices
windows/tabsadb start-server
adb devices
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.
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).
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
Exactly same problem. Tried kill and start but what this worked for me:
adb reconnect
Hope it helps.
I fixed this by doing the following:
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.
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.
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:
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.
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.
Source: Stackoverflow.com