I’m running my Appium script with Python instead of
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...
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.
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
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.
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:
after deleting the Mobizen2 folder, then all adb commands work fine.
Exactly same problem. Tried kill and start but what this worked for me:
Hope it helps.
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%AppDataLocalAndroidsdkplatform-tools )
This solved the problem in my case.
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).
On Windows, just check in the windows task manager if there are any other adb processes running.
If yes, just kill it & then perform the
adb start-server command.
I hope, it should solve the problem.
For those of you that have HTC Sync installed, uninstalling the application fixed this problem for me.
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.
I had same problem since updated platfrom-tool to version 24 and not sure for root cause…(current adb version is 1.0.36)
adb kill-server and
adb start-server but problem still happened
but when I downgrade adb version to 1.0.32 everything work will
What worked for me:
- Close all
- 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
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 FilesMicrovirtMEmu)
And then Delete the adb.exe file.
It should work fine for you.
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.
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.
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.