Skip to main content

Command Palette

Search for a command to run...

Fix adb Server and Client Version Mismatch on Mac

Published
1 min read

Originally published at recca0120.github.io

The Problem

After updating the Android SDK, running adb devices threw:

adb server version (41) doesn't match this client (40)

It turned out that I had previously installed android-platform-tools via Homebrew on my Mac, resulting in two different versions of adb on the system. The server and client were picking up different versions.

The Fix

First, remove the Homebrew-installed copy:

brew uninstall --cask android-platform-tools

Then add the Android SDK path to ~/.bashrc so the system uses a single adb:

export ANDROID_HOME="/Users/recca0120/Library/Android/sdk"
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$PATH"

Finally, run source ~/.bashrc to apply the changes, then adb devices should work normally.

More from this blog

recca0120

115 posts