You are currently viewing [Solved] adb server version doesn’t match this client in Android
Android adb

[Solved] adb server version doesn’t match this client in Android


Error: adb server version doesn’t match this client in Android

You may face error “adb server version doesn’t match this client” during working with Android application using Android Studio or Xamarin.Android (or Xamarin.Forms) Application using Visual Studio.

and error may be display as follow:

adb server version (40) doesn't match this client (41); killing...
ADB server didn't ACK

The Possible Reason: Multiple Version of adb.exe installed in the system.

Here I give you possible solutions to solve the error: “adb server version doesn’t match this client”.

Open your Command-Line ( Windows + R => type cmd=> Enter for Windows os) or Terminal and execute

echo %PATH%

Check if any path contains “android-sdk\platform-tools” or not. If not then you need to set Environment variable Path for adb.

How to Set Environment Variable- Path?

Set Environment Path Variable
Set Environment Path Variable

To set an Environment Variable Path, you need to follow the following steps:

  1. Right Click on My Computer / This PC -> Go To Properties
  2. Select Advanced System Setting
  3. Select Environment Variables…
  4. Select Path Variable from System Variables List and Click on Edit.
  5. Add Semicolon (;) at the last of the Path String and add your custom path.

In our case, we need to set Path for adb in Path Variable.

Search adb.exe to get the Path for adb. If you are using Android (Java Platform) the Path might be “C:\Users\USERNAME\AppData\Local\Android\Sdk\platform-tools”. and If you are using Xamarin.Android or Xamarin.Forms then Path might be “C:\Program Files (x86)\Android\android-sdk\platform-tools”.

Set the Environment Path Variable according to adb.exe path. After this process, we need to reopen the Command-line (or CMD) and execute the following command:

adb version
Check adb version using CMD
Check adb version using CMD

– I am using Xamarin.Android for Android App.

Now you can run Android Studio or Visual Studio to Check if Error is Solved or not.

If you have still the same error, the possible reason is another adb.exe is already running from a different location.

How to check adb.exe is running or not?

To Check whether another adb.exe is running or not you need to open Task Manager and check for adb.exe.

If adb.exe is there you need to right-click and then go to properties. Check the location of adb.exe.

Check adb.exe Path from Task Manager
Check adb.exe Path from Task Manager

If you adb.exe location path from Task Manager and adb.exe Path from your “adb version” command output is different then that is the reason for the error.

Update your Environment Path Variable Path for adb.exe to adb.exe location path from Task Manager. You need to set ADB Environment Variable as well to this new Path.

How to set the environment variable ADB (which is read by scrcpy)?

In a shell (typically on Linux), you can set the variable for a single command:

VAR=value command

On Windows, you can set it globally in Windows preferenced, but you can also set it locally:

set VAR=value

If you are using a Windows system then execute following command in CMD:

set ADB=C:\...\AppData\Local\Android\Sdk\platform-tools\adb.exe

– You must use the full path to the adb.exe

That’s all done.

Again you need to execute “adb version” command on command-line and check the version and Path for your adb.exe

Here is the Checklist for the entire process:

  1. Check Path for adb.exe is already set in Path Variable or not.
  2. Check if any another adb.exe is already running or not
  3. check the adb.exe version using “adb version” command
  4. Set Path for ADB variable using command-line

Note: Make sure that Path for your adb.exe must be the same in all the case.

Now restart you Android Studio or Visual Studio and Run the Application.

Hope this will Helps. Enjoy your day! Please like and Share if you really like this.

How useful was this post?

Click on a star to rate it!

Average rating 4.4 / 5. Vote count: 14

No votes so far! Be the first to rate this post.

As you found this post useful...

Share this post on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?