Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29622

react-native run-android Fails MacOS

$
0
0

Complete Console Output is below

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.Jetifier found 967 file(s) to forward-jetify. Using 8 workers...info JS server already running.info Installing the app...FAILURE: Build failed with an exception.* What went wrong:Could not initialize class org.codehaus.groovy.runtime.InvokerHelper* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 696mserror Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081FAILURE: Build failed with an exception.* What went wrong:Could not initialize class org.codehaus.groovy.runtime.InvokerHelper* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 696ms    at makeError (/Users/user/Desktop/sa/MyReactApp/node_modules/execa/index.js:174:9)    at /Users/user/Desktop/sa/MyReactApp/node_modules/execa/index.js:278:16    at processTicksAndRejections (internal/process/task_queues.js:97:5)    at async runOnAllDevices (/Users/user/Desktop/sa/MyReactApp/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:5)    at async Command.handleAction (/Users/user/Desktop/sa/MyReactApp/node_modules/@react-native-community/cli/build/index.js:186:9)

Bash_profile

export ANDROID_HOME=$HOME/Library/Android/sdkexport PATH=$PATH:$ANDROID_HOME/emulatorexport PATH=$PATH:$ANDROID_HOME/toolsexport PATH=$PATH:$ANDROID_HOME/tools/binexport PATH=$PATH:$ANDROID_HOME/platform-toolsexport ANDROID_SDK_ROOT=$ANDROID_HOMEexport ANDROID_AVD_HOME=$HOME/.android/avdalias emulator='$ANDROID_SDK_ROOT/tools/emulator'

Requested Attachments

  1. Android SDK Link From Android Studio

enter image description here

  1. SDK Tools Installed

enter image description here

  1. npx @react-native-community/cli doctor Result

enter image description here

Installed Android EmulatorNexus 6P (Android R and Pie)

New To React Nativeit works perfectly on iOSbut it fails to launch in Android Simulator

Tried Ways

  1. npm start
  2. npx react-native run-ios
  3. npx react-native run-android

Viewing all articles
Browse latest Browse all 29622

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>