任务 ':app:processDebugMainManifest' 执行失败

时间:2021-05-09 11:32:35

标签: android reactjs react-native android-studio

我正在尝试启动这个使用纯 react-native 创建的项目。我完全按照 react-native 文档所说的做了,但仍然出现错误并且不知道如何解决。请有人指导我完成我做错的步骤。

info Installing the app...
> Task :app:processDebugMainManifest FAILED
39 actionable tasks: 2 executed, 37 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @e418cdf

* 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 23s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @e418cdf

这里是项目的依赖

"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.4",
"react": "17.0.1",
"react-native": "0.64.1",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.1.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.1.1"

0 个答案:

没有答案