React-Native, Android, Genymotion: ADB server didn't ACK

Viewed 87864

I am working with React-Native, Android, and Genymotion on Mac. When I run react-native run-android I get this lines at the end of the launch operation:

...
04:54:40 E/adb: error: could not install *smartsocket* listener: Address already in use
04:54:40 E/adb: ADB server didn't ACK
04:54:40 E/ddms: '/Users/paulbrie/Library/Android/sdk/platform-tools/adb,start-server' failed -- run manually if necessary
04:54:40 E/adb: * failed to start daemon *
04:54:40 E/adb: error: cannot connect to daemon
:app:installDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: Timeout getting device list.
...

However, adb devices returns this:

List of devices attached
192.168.59.101:5555 device

So far I've found no solution to run my app on the emulator. Has anyone encountered the same issue?

Thanks, Paul

13 Answers

Maybe your adb versions are mismatching

Check:

adb version 

Then:

cd /Path/to/Android/Sdk/platform-tools && ./adb version

If these two are different you have an error here, just remove adb from sys and copy the one that is in platform-tools to /usr/bin/

the adb version on your system is different from the adb version on the android sdk platform-tools . Below suggestion is work for me for Linux operating system

  1. check sys adb version run the below command

adb version

Android Debug Bridge version 1.0.39

  1. check sdk adb version

cd /root/Android/Sdk/platform-tools

./adb version

Android Debug Bridge version 1.0.32

  1. copy

rm /usr/bin/adb

[Note : the above command remove the existing adb then copy the adb from sdk/platform-tools directory ]

sudo cp /root/Android/Sdk/platform-tools/adb /usr/bin/adb

Then run the project using this command

react-native run-android

I had a similar issue.

First, I uninstalled the app. Then, I pointed GenyMotion to the android sdk provided from Android Studio Next, I ran "adb kill-server" into the terminal. Finally, I re-ran "react-native run-android" and got a build success.

For Ubuntu

It works for me!!

  1. check sys adb version

adb version

Android Debug Bridge version 1.0.39

2 check sdk adb version

cd /home/user_name/Android/sdk/platform-tools

./adb version

Android Debug Bridge version 1.0.32

  1. copy

sudo cp /home/user_name/Android/sdk/platform-tools/adb /usr/local/bin

that's all! It will work now.

1.use custom sdk path in genymotion.(Suppose this one won't work means,Try to execute the second one)

2.Manually use this command to execute(SDK PATH/adb she ll am start -n/Package name/MainActivity).

C:\Users\AppData\Local\Android\Sdk/platform-tools/adb she ll am start -n com.example/com.example.ManiActivity

And try to run the application by using react-native run-android.

Same issue happened when I try to run my react-native project in Genymotion

For Linux ubuntu 20.04 Go to /home/mycomputer/Android/Sdk/platorm-tools

run $./adb version

just copy the adb path in /usr/bin

$ sudo cp /home/raik/Android/Sdk/platform-tools/adb /usr/bin

Then I can run my project in genymotion.

Note: In some Linux system may be copied to this path /usr/local/bin`

If someone is facing this issue in Windows with Android Studio emulator then just run following command in powershell or cmd:

taskkill /F /IM adb.exe

It should kill all the adb process instances and then you can Reload the app or Start the App on Android again via Expo CLI.

Related