React-Native Run-Android Has Error, How to Fix It

Fix Build Failed on React-Native run-android

The error says no devices connected.

Means there is no emulator or a device connected to your system.

  1. If you have an emulator please run it before running react native app. If not please create an emulator first.

Follow this link to create one : create emulator


  1. If you want to run it on your phone. Attach it with a cable and turn on usb debugging on your phone.

Hope this solves your problem

how can I fix build failed after I run react-native run-android in windows 10

ANDROID_HOME is Deprecated (in Android Studio), use ANDROID_SDK_ROOT instead.

Configure the ANDROID_SDK_ROOT environment variable

  1. Open the Windows Control Panel.
  2. Click on User Accounts, then click
    User Accounts again
  3. Click on Change my environment variables
  4. Click on New... to create a new ANDROID_SDK_ROOT user variable that points to the path to your Android SDK:

The SDK is installed, by default, at the following location:

%LOCALAPPDATA%\Android\Sdk

You can find the actual location of the SDK in the Android Studio "Settings" dialog, under Appearance & Behavior → System Settings → Android SDK.

npx react-native run-android fails with error

Sample Image

basically gradle-6.3 did the trick. when i set up everything it was 6.2. in gradle-wrapper.properties i had to change 6.2 to 6.3 like this:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

react-native android project not found error

The issue comes after glob@7.2.2 was released. Follow the following steps and recompile the project.

  1. Clear node_modules
  2. add this to package.json
    "resolutions": { "glob": "7.2.0" }
  3. Reinstall node_modules with npm install

If this not work try this command

" yarn add glob@7.2.0"



Related Topics



Leave a reply



Submit