Cryptic Gradle errors. A Metro bundler that won’t start. An adb devices that returns nothing. If you’ve ever felt like React Native is playing a cruel joke on you at 11pm before a deadline, you’re not alone.

This chapter of React Native Unplugged walks through the most common react-native run-android failures in 2026 — including errors specific to the New Architecture (enabled by default in React Native 0.76+) — so you can fix them systematically instead of Googling in circles.

3D blue React logo atom symbol on a white background

Step 0: Run the Doctor First

Before anything else:

npx react-native doctor

This command audits your environment and flags missing or misconfigured dependencies with suggested fixes. It catches most setup issues before you spend an hour debugging the wrong thing.

Fix 1: Java Version Mismatch (The #1 Cause of Build Failures)

React Native 0.73+ requires JDK 17. That’s the version the React Native docs recommend. Java 11 will fail. Newer JDKs (21+) can also break builds unless your Gradle version is new enough to support them — when in doubt, stick to 17.

Check your version:

java -version

If it’s not 17, install it. On macOS with Homebrew:

brew install openjdk@17
export JAVA_HOME=$(/usr/libexec/java_home -v 17)

You can also pin the JVM in android/gradle.properties:

org.gradle.java.home=/path/to/jdk-17

This overrides whatever JAVA_HOME is set to system-wide, which helps on machines with multiple Java versions installed.

Fix 2: ANDROID_HOME Not Set

If adb devices returns nothing or react-native run-android can’t find the SDK:

# macOS
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$PATH

# Linux
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$PATH

Add these lines to your ~/.zshrc (or ~/.bashrc) so they persist. On Windows, set ANDROID_HOME via System Properties → Environment Variables.

After setting it, verify:

adb devices

If no devices appear, either start an emulator from Android Studio (Tools → Device Manager) or connect a physical device with USB debugging enabled.

Fix 3: Gradle Build Failures

Gradle issues are the most common source of broken Android builds. Start with a clean:

cd android && ./gradlew clean
cd .. && npx react-native run-android

Check your Gradle and AGP versions. Current React Native templates (0.86-era) typically expect:

  • Android Gradle Plugin (AGP) 8.x or 9.x
  • Gradle 8.x+ (match whatever your RN version’s template ships)
  • Kotlin 2.x
  • minSdkVersion 24+, compileSdk / targetSdk in the mid-30s (templates now often use compileSdk 36–37 and targetSdk 35–36)

These live in android/build.gradle or the version catalog (gradle/libs.versions.toml), depending on your project:

buildscript {
  ext {
    buildToolsVersion = "36.0.0"
    minSdkVersion = 24
    compileSdkVersion = 36
    targetSdkVersion = 36
    kotlinVersion = "2.1.20"
  }
  dependencies {
    classpath("com.android.tools.build:gradle:8.8.0")
    classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
  }
}

Prefer the versions from your React Native template over copying numbers from a blog — mismatched AGP/Gradle pairs are a classic failure mode. To bump the Gradle wrapper:

cd android && ./gradlew wrapper --gradle-version 8.13 --distribution-type all

Fix 4: AGP 8+ — Missing namespace in build.gradle

If you see an error like Namespace not specified, this is an AGP 8+ breaking change. Every module’s build.gradle must now declare a namespace:

// android/app/build.gradle
android {
  namespace "com.yourapp"
  // ...
}

This replaces the old package attribute in AndroidManifest.xml for build purposes. If a third-party library throws this error, check if it has an updated version that’s AGP 8+ compatible.

Fix 5: New Architecture Compatibility Errors

React Native 0.76+ enables the New Architecture by default. If you get errors like TurboModuleRegistry.get(...) returning null, or native module crashes on startup, a native dependency likely doesn’t support the New Architecture yet.

Diagnose: Check if the error disappears when you disable the New Architecture temporarily in android/gradle.properties:

newArchEnabled=false

If it does, the culprit is a library that hasn’t added TurboModule/Fabric support. Check the library’s GitHub for an open issue or a newer version. The React Native Directory shows which libraries support the New Architecture.

Fix 6: Dependency Conflicts

If you’re getting version conflict errors during the build:

cd android && ./gradlew dependencies 2>&1 | grep "FAILED\|conflict"

Then clean and reinstall:

rm -rf node_modules
rm -rf android/app/build
npm install
cd android && ./gradlew clean
cd .. && npx react-native run-android

If a specific library is causing conflicts, check its peer dependency requirements — many libraries have minimum versions of react-native-reanimated, react-native-gesture-handler, or other common dependencies.

Fix 7: Metro Bundler Issues

If Metro starts but the app won’t load, or the bundler crashes:

npx react-native start --reset-cache

Then in a separate terminal:

npx react-native run-android

If another process is using port 8081:

# macOS/Linux — find and kill the process
lsof -i :8081
kill -9 <PID>

# Or start Metro on a different port
npx react-native start --port 8082
# Then: npx react-native run-android --port 8082

# Windows
taskkill /F /IM node.exe

Fix 8: Nuclear Option — Full Reset

If nothing has worked:

rm -rf node_modules
npm install
cd android
./gradlew clean
cd ..
npx react-native run-android

On macOS, also clear the Gradle cache if you suspect a corrupted download:

rm -rf ~/.gradle/caches

Then rebuild.

Quick Reference: Error → Fix

ErrorMost Likely CauseFix
SDK location not foundANDROID_HOME not setFix 2
Unsupported class file major versionWrong Java versionFix 1 (JDK 17)
Namespace not specifiedAGP 8+ breaking changeFix 4
TurboModuleRegistry crashNew Architecture incompatibilityFix 5
Could not resolve dependencyVersion conflictFix 6
Metro bundler not connectingPort conflict or cacheFix 7
Everything else failsCorrupted stateFix 8

What’s Next

Getting the Android build running is just the first hurdle. Once run-android succeeds, the next decision that shapes your app is how screens connect — which is exactly what navigation in React Native covers next in React Native Unplugged.