-2

I am just starting with react native. I created my first app using React Native CLI. It was created without any errors. When I am trying to react-native run-android It ends up with this error as shown. enter image description here

Climb Tree
  • 490
  • 1
  • 7
  • 15

5 Answers5

3

1) Run command " adb devices " It will let you know if any device is connected or not

2) Try running by setting the Environment variable and proxy commands. Follow this link: http://facebook.github.io/react-native/releases/0.38/docs/getting-started.html#content

Tj Saini
  • 86
  • 5
0

first Start the android emulator.

From your react native folder run:

cd android && gradlew clean

THEN

cd .. && react-native run-android
Arunkumar
  • 1,705
  • 1
  • 17
  • 25
0

Make sure you have your device connected to your computer, you can check that by running:

adb devices

if it's not connected, in your phone go to: settings > Developer Options > (enable) USB debugging.

Else if you want to run it from an emulator you will need to either install Genymotion, or AndroidStudio.

Sidah Merzouk
  • 584
  • 5
  • 18
0

1) Run command adb devices to list all connected devices.

2) Then run command emulator @YOUR_DEVICE_NAME.

3) If adb devices will not show any devices then follow this link http://facebook.github.io/react-native/releases/0.38/docs/getting-started.html#content

Sumeet Roy
  • 140
  • 12
-1

Have an android phone attached to your computer via USB cable and enable USB Debugging in the developer options. To get to the developer options open your About Phone and tap the version number several times.

Once it is in USB Debugging mode, run adb devices and a prompt will show up on your phone. Accept it and you should be good to go.

Another problem I had was I needed to path my SDK location, if you run into that then this will help: React Native android build failed. SDK location not found