I print react-native run-android
And get the following output:
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.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 11.385 secs Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html
I have genymotion emulator running. I have defined android home and path
export ANDROID_HOME=/home/jonstark/Documents/android/
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
In sdk manager I have downloaded all required packages. What do I do?
The problem @Gaurang was solving was a problem with ADB. The reason that the build failed is because ADB times out querying for the available devices.
The following steps resolved this issue for me...

I found this because I realized that my adb server wasn't started. Following this SOF article (Adb won't start), I changed directory into my {ANDROID_SDK_FOLDER}/tools and ran adb kill-server then adb start-server only to receive the error adb server version (32) doesn't match this client (36). Searching this lead me to the following article and hence the resolution. Hope it helps someone else :)
Reference: http://nmp90.com/2016/04/android-adb-server-version-32-doesnt-match-client-genymotion/
First check which adb are you using.
$ which adb
If you get like this:
/home/wakematta/Android/Sdk/platform-tools/adb
Follow this steps
If you get like this:
/usr/bin/adb
You have a confilict of ADB's. You need to run this command to remove the unnecessary adb:
$ sudo apt-get autoremove android-tools-adb android-tools-fastboot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With