0
votes

$ react-native run-android 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 4 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.org

BUILD FAILED in 669ms

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

But it was running perfectly on ios simulator only problem while running or android emulator

1
Found the solution: It works for me In gradle-wrapper.properties I changed the distributionUrl >> previous : distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip >> change to : distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip - Biswaranjan Mohanty
Please let as now what version of react-native are you using, so that other users with same version can easier find the solution for the same problem. - radovix

1 Answers

0
votes

In gradle-wrapper.properties distributionUrl=https://services.gradle.org/distributions/gradle-6.3-all.zip