react-native run-android错误:失败:构建失败,出现异常

时间:2020-08-25 16:43:11

标签: android react-native npm npx

我是开发React-native应用程序的新手,尝试在模拟器上运行该应用程序时遇到问题(我正在使用物理设备并进行USB调试)
错误如下:

当我运行命令时:npx 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 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.org

BUILD FAILED in 1s

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.bat app:installDebug -PreactNativeDevServerPort=8081

你能帮我吗?

0 个答案:

没有答案