Task :app: process debug main manifest failed

  android-studio, cmd, react-native, reactjs, windows

D:ProjectReactP01>npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "–no-jetifier" flag.
Jetifier found 903 file(s) to forward-jetify. Using 8 workers…
info JS server already running.
info Installing the app…

Task :app:processDebugMainManifest FAILED
11 actionable tasks: 2 executed, 9 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 @742de306

  • 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 4s

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 @742de306

  • 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 4s

at makeError (D:ProjectReactP01node_modulesexecaindex.js:174:9)
at D:ProjectReactP01node_modulesexecaindex.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async runOnAllDevices (D:[email protected]ndroidbuildcommandsrunAndroidrunOnAllDevices.js:94:5)
at async Command.handleAction (D:[email protected]js:186:9)

info Run CLI with –verbose flag for more details.

D:ProjectReactP01>

Source: Windows Questions

2 thoughts on - Task :app: process debug main manifest failed

  • Okay i did some more research and found a solution! This problem comes with Java 16, just download and set up java jdk 11, an older version, then it works

LEAVE A COMMENT