16

I recently install react-native, initialize a project and run it

$ react-native init AwesomeProject
$ react-native run-android

Always get a error

adb server version (32) doesn't match this client (36); killing...

and my device shows me

Error

How to solve both error?

7
  • Are you running the project on emulator or real device? Did you try disconnecting the device and runningadb kill-server and adb start-server and run again ? Commented Jul 21, 2016 at 18:48
  • I'm running on my real device Commented Jul 21, 2016 at 18:48
  • Try disconnecting the device and running adb kill-server and adb start-server. Commented Jul 21, 2016 at 18:50
  • I did a couple times before posted here Commented Jul 21, 2016 at 18:50
  • I've solved the first problem (adb was installed twice, system package manager and android package manager) Commented Jul 21, 2016 at 18:58

3 Answers 3

58

This is because the adb version on your system is different from the adb version on the android sdk platform-tools. you can check that to insure:

Open the terminal and check the adb version on the system:

$adb version

And from the Android SDK platform-tool directory:

$cd ~/Android/Sdk/platform-tools
$./adb version

simple solution: Copy adb from Android SDK directory to usr/bin directory.

$sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin
Sign up to request clarification or add additional context in comments.

2 Comments

thanks, mine was in /usr/local/bin though. OS X El Capitan
[OS X Sierra] For me, the problem seems to have come from a conflicting install of adb by expo. After comparing the version and pasting over the newer copy of adb from the android sdk (~/Android/Sdk/platform-tools/adb) install to the expo install (/usr/local/bin) it fixed the problem for me. The copy of adb in (/usr/local/bin) was actually an alias to the expo copy which I right clicked after running (open /usr/local/bin) and selected "show original".
1

Did you brew install android-sdk?

I was getting the following error when running react-native run-android:

adb server version (36) doesn't match this client (39); killing...
error: could not install *smartsocket* listener: Address already in use
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon
Could not run adb reverse: Command failed: /Users/beau/Library/Android/sdk/platform-tools/adb -s emulator-5554 reverse tcp:8081 tcp:8081

I found that I had adb installed at /usr/local/bin/adb:

$ ll /usr/local/bin/adb
lrwxr-xr-x  1 beau  admin  38 Mar 13 12:12 /usr/local/bin/adb@ -> ../Cellar/android-sdk/24.4.1_1/bin/adb

It was installed with brew install android-sdk and never used, so I uninstalled it:

brew uninstall android-sdk

…and the adb error was gone when I re-ran react-native run-android.

Comments

-1

Thanks , this solution works for me. I have been struggling with this problem for few days, reinstall android studio, add custom android Sdk tools path under Genymotion ADB setting nothing works.Just wants to share with who have the same issues. I use Ubuntu 16.04. I did the copy adb to /usr/bin as suggested, since the adb version I have is 1.0.32.

/usr/local$ adb version Android Debug Bridge version 1.0.39 Revision 3db08f2c6889-android Installed as /usr/bin/adb Then I updated ADB setting under Genymotion to the default, use Genymotion Android tools. And start virtual device.

Under Expo XDE, start the project, then click device. Then I see the following message. Couldn't adb reverse: closed Opening on Android device Building JavaScript bundle: finished in 3669ms.

It works!!!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.