adb prints 'server version doesn't match this client; killing...'
adb server version (40) doesn't match this client (41); killing...Short answer
adb runs a background server, and every adb command is a client. When the client finds a server of a different version, it kills that server and starts its own. Two different adb copies on the machine cause it. Find them, then use one platform-tools install everywhere.
Fix it fast
1Find out which cause you have
List every adb binary on the PATH and print the version of each. More than one path means two adb builds share the server.
which -a adb adb version2Match what you see, then jump to its fix
- 1
which -a adb prints more than one pathTwo copies of adb are installed, for example one from a package manager and one from the SDKFix - 2
the message comes back every time you switch between Android Studio and a terminal or another toolTwo tools take turns replacing each other's serverFix - 3
adb version shows an older number than the SDK Manager offersThe Platform-Tools package is oldFix
- 1
What does the error look like?
adb server version (40) doesn't match this client (41); killing...adb server version doesn't match this client; killing...
Cause 1 of 3
Two copies of adb are installed, for example one from a package manager and one from the SDK
1Check
Compare the versions of each binary by running each path with version.
which -a adb
"$ANDROID_HOME/platform-tools/adb" version2Fix
Keep one copy. Android's own guidance is to take the platform-tools from the SDK Manager, so remove the other one and put the SDK folder first on the PATH.
export ANDROID_HOME="$HOME/Library/Android/sdk" # use your own SDK path
export PATH="$ANDROID_HOME/platform-tools:$PATH"3Verify
Only one adb path is printed.
which -a adbConfirmed by developer.android.com
Cause 2 of 3
Two tools take turns replacing each other's server
1Check
The adb client compares its own server version with the running server. When they differ it prints this message, kills the old server and starts a new one, as the adb source shows. A tool that bundles its own adb will do this to yours.
which -a adb2Fix
Point every tool at the same adb binary, or stop the server and let one tool start it.
adb kill-server
adb start-server3Verify
Switch between the tools and check that the message stays away.
adb devicesConfirmed by android.googlesource.com
Cause 3 of 3
The Platform-Tools package is old
1Check
Google says adb and fastboot are backward compatible, so you should only need the latest SDK Platform-Tools.
adb version2Fix
Update Platform-Tools in Android Studio's SDK Manager, or with the sdkmanager tool, then restart the server.
adb kill-server
adb start-server3Verify
The new version number shows.
adb versionConfirmed by developer.android.com
How do I stop it coming back?
- Install platform-tools once, from the SDK Manager, and keep it on the PATH.
- Do not install a second adb with a package manager when Android Studio is on the machine.
- Update Platform-Tools when you update Android Studio.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
adb tcpip 5555 fails because no device is found
adb: more than one device/emulator
adb tcpip only works while the device is attached and listed by adb, because it tells the phone to start listening on port 5555.
4 causes, each with a fixMobile apps
The Android Emulator says /dev/kvm is not found
KVM acceleration can NOT be used
The emulator wants a hypervisor and cannot find one.
4 causes, each with a fixMobile apps
The emulator says the GPU driver is unsupported and falls back to software
vulkan-1.dll cannot be found
The emulator picks a graphics mode when it starts.
4 causes, each with a fixMobile apps
The Android Emulator will not start with hardware acceleration (HAXM, Hyper-V, KVM)
KVM acceleration can NOT be used
Intel HAXM is discontinued, and current emulators no longer use it.
4 causes, each with a fix