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.
Top comments (0)