[英]Execution failed for task ':app:processDebugMainManifest' when trying to built an Onboarding Screen Android Studio (liquid swipe)
[英]i got this error Execution failed for task :app:processDebugMainManifest while running with npm run android but with android studio it works fine
react-native run-android
info 運行 jetifier 將庫遷移到 AndroidX。 您可以使用“--no-jetifier”標志禁用它。 Jetifier 找到 870 個文件來轉發-jetify。 使用 8 個工人... info JS 服務器已經在運行。 npm:load Completed in 18ms info 安裝應用程序...
Task:app:processDebugMainManifest FAILED FAILURE:構建失敗並出現異常。
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 @5e15465d
嘗試:使用 --stacktrace 選項運行以獲取堆棧跟蹤。 使用 --info 或 --debug 選項運行以獲得更多日志 output。 運行 --scan 以獲得完整的見解。
在https://help.gradle.org獲得更多幫助
2 秒內構建失敗
錯誤 無法安裝應用程序。 確保您已設置 Android 開發環境: https://reactnative.dev/docs/environment-setup 。 Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/ repository/android/common/01 Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
FAILURE:構建失敗並出現異常。
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 @5e15465d
嘗試:使用 --stacktrace 選項運行以獲取堆棧跟蹤。 使用 --info 或 --debug 選項運行以獲得更多日志 output。 運行 --scan 以獲得完整的見解。
在https://help.gradle.org獲得更多幫助
2 秒內構建失敗
at makeError (/Users/arbazshaikh/Desktop/authentication/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:174:9)
at /Users/arbazshaikh/Desktop/authentication/node_modules/@react-native-community/cli-platform-android/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/arbazshaikh/Desktop/authentication/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/arbazshaikh/Desktop/authentication/node_modules/@react-native-community/cli/build/index.js:192:9)
info 使用 --verbose 標志運行 CLI 以獲取更多詳細信息。
我不知道它是否與Mac M1芯片有關
最后我找到了解決方案。我的 JDK 版本是 17。仍然不知道為什么 JDK 17 在一段時間后會出錯。 現在我降級到 JDK 14,現在可以正常工作了!!! 希望這可以幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.