user2950593
user2950593

Reputation: 9637

react native errorTimeout getting device list. When running hello world on ubuntu

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?

Upvotes: 21

Views: 5994

Answers (3)

Chris Geirman
Chris Geirman

Reputation: 9684

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...

  1. In Genymotion, go to Settings > ADB (tab)
  2. Select radio option "Use custom Android SDK tools" and add the path to your Android SDK
  3. Restart Genymotion (may not totally be necessary, but I did and it worked)
  4. If the above steps don't work, try also rebooting your machine as commenters have stated this worked for them. [Added This on Aug 10th]

enter image description here

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/

Upvotes: 29

Mohamed Ziata
Mohamed Ziata

Reputation: 1226

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

Upvotes: 3

Gaurang Deshpande
Gaurang Deshpande

Reputation: 861

  1. Download this arch. : https://dl-ssl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
  2. Go to your Android SDK folder
  3. Remove old /platform-tools
  4. Insert downloaded from link above
  5. Hope this help you.

REference

make sure your adb version is 1.0.32

Upvotes: 0

Related Questions