-1

Please help me. My React Native app is not running in my mobile. It works fine on the android simulator, but the performance is quiet bad.

The error is:

$ 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 2 workers...
  info Starting JS server...
  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 8s

  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: Com

  mand failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Kishan Bharda
  • 5,446
  • 3
  • 30
  • 57
The Plier
  • 35
  • 4

3 Answers3

0

Try React Native environment to upgrade your environment because there is a thread in here Grovy Error

0

It's simple , just connect your mobile with Android studio and on the developing mode , then select the device from Android studio and run the project the app will simply open on your phone , unless you don't have any errors in enviornment.

Anuj Sharma
  • 429
  • 6
  • 17
0

This might be because lower version of Jdk. Please update JDK version supported by Android Studio

For Reff : Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

Nooruddin Lakhani
  • 7,507
  • 2
  • 19
  • 39