0

When I click "run" on the top right corner to launch my basic "Hello World" application, my device isn't recognized, and if I set the configurations to give a popup to select either an AVD or a connected device, I get the following errors:

7:34 PM adb server version (39) doesn't match this client (40); killing...

7:34 PM could not read ok from ADB Server

7:34 PM * failed to start daemon

7:34 PM error: cannot connect to daemon

7:34 PM 'C:\Users\<MyName>\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary

Developer mode and USB debugging is enabled on my phone, and I have the latest Gradle installed. I believe my Path variables are set correctly and the android SDK, Gradle, and JVM paths are all correctly set in IntelliJ.

2 Answers2

0

This is because you are running 2 different versions of ADB.

Run adb kill-server and then C:\Users\<MyName>\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server

Add C:\Users\<MyName>\AppData\Local\Android\Sdk\platform-tools\ to the beginning of your environment path.

Also, there is already a discussion here: adb server version doesn't match this client

shizhen
  • 12,251
  • 9
  • 52
  • 88
0

Try using command line to connect device.Firstly plug in usb cable,then run below commands:

adb kill-server
adb devices

And check whether usb cable line work normally.

navylover
  • 12,383
  • 5
  • 28
  • 41
  • you could download standalone adb tool from https://developer.android.com/studio/releases/platform-tools#downloads – navylover Aug 28 '18 at 02:48