简体   繁体   English

我收到此错误 Execution failed for task:app:processDebugMainManifest while running with npm run android 但使用 android studio 运行正常

[英]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 react-native run-android

info Running jetifier to migrate libraries to AndroidX. info 运行 jetifier 将库迁移到 AndroidX。 You can disable it using "--no-jetifier" flag.您可以使用“--no-jetifier”标志禁用它。 Jetifier found 870 file(s) to forward-jetify. Jetifier 找到 870 个文件来转发-jetify。 Using 8 workers... info JS server already running.使用 8 个工人... info JS 服务器已经在运行。 npm:load Completed in 18ms info Installing the app... npm:load Completed in 18ms info 安装应用程序...

Task:app:processDebugMainManifest FAILED FAILURE: Build failed with an exception. Task:app:processDebugMainManifest FAILED FAILURE:构建失败并出现异常。

  • What went wrong: Execution failed for task ':app:processDebugMainManifest'.出了什么问题:任务“: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 @5e15465d 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

  • Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.使用 --info 或 --debug 选项运行以获得更多日志 output。 Run with --scan to get full insights.运行 --scan 以获得完整的见解。

  • Get more help at https://help.gradle.orghttps://help.gradle.org获得更多帮助

BUILD FAILED in 2s 2 秒内构建失败

error Failed to install the app.错误 无法安装应用程序。 Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup .确保您已设置 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 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: Build failed with an exception. FAILURE:构建失败并出现异常。

  • What went wrong: Execution failed for task ':app:processDebugMainManifest'.出了什么问题:任务“: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 @5e15465d 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

  • Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.使用 --info 或 --debug 选项运行以获得更多日志 output。 Run with --scan to get full insights.运行 --scan 以获得完整的见解。

  • Get more help at https://help.gradle.orghttps://help.gradle.org获得更多帮助

BUILD FAILED in 2s 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 Run CLI with --verbose flag for more details. info 使用 --verbose 标志运行 CLI 以获取更多详细信息。

i don't know if its related to Mac M1 chip我不知道它是否与Mac M1芯片有关

Finally i found solution for this.. My JDK version was 17. still don't know why JDK 17 gave error after sometime.最后我找到了解决方案。我的 JDK 版本是 17。仍然不知道为什么 JDK 17 在一段时间后会出错。 Now i downgraded to JDK 14 and now works fine!!!现在我降级到 JDK 14,现在可以正常工作了!!! Hope this helps希望这可以帮助

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试构建入职屏幕 Android Studio(液体滑动)时任务“:app:processDebugMainManifest”执行失败 - Execution failed for task ':app:processDebugMainManifest' when trying to built an Onboarding Screen Android Studio (liquid swipe) 将 Android Studio 升级到 Electric Eel 后,任务“:app:processDebugMainManifest”执行失败 - Execution failed for task ':app:processDebugMainManifest' after upgrading Android Studio to Electric Eel 我在 Flutter 上收到此错误“任务 ':app:processDebugMainManifest' 执行失败” - I´m getting this error "Execution failed for task ':app:processDebugMainManifest'" on Flutter 任务“:app:processDebugMainManifest”错误执行失败 - Execution failed for task ':app:processDebugMainManifest' error Android Studio 重建项目任务:app:processDebugMainManifest FAILED - Android Studio Rebuilding Project Task :app:processDebugMainManifest FAILED 运行 npm react-native run-android 时突然出错。 任务:应用程序:进程调试资源失败 - Sudden error while running the npm react-native run-android. Task :app:processDebugResources FAILED 错误:任务':app:zipalignDebug'的执行失败。 >当我在Android Studio上运行我的应用程序时 - Error:Execution failed for task ':app:zipalignDebug'. > when I run my app on Android Studio Flutter 错误。 任务“:app:processDebugMainManifest”执行失败 - Flutter Error. Execution failed for task ':app:processDebugMainManifest' 在 Android Studio 中运行 Flutter 应用程序时出错:任务 ':app:generateDebugBuildConfig' 执行失败 - ERROR When Running Flutter App in Android Studio: Execution failed for task ':app:generateDebugBuildConfig' android运行失败错误:任务':app:compileDebugJavaWithJavac'的执行失败 - android run failed Error:Execution failed for task ':app:compileDebugJavaWithJavac'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM