Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix error :processDebugMainManifest DEBUG

I faced this debug while trying to run my own flutter project in device.this is some description:: 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 @6109445c

  • 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

Can anyone could help me!!

like image 962
riadh salem Avatar asked Mar 26 '21 23:03

riadh salem


People also ask

What went wrong with processdebugmainmanifest task?

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 @fb04536 Try: Run with --stacktrace option to get the stack trace.

Why am I getting errors when trying to merge manifest files?

If your Android Project has multiple modules or flavors then there could be errors due to that for that the best way out is trying to merge manifest files from all modules into the Main manifest, if you have a multi-module project using Android Studio, and Gradle.

Why is my code being added multiple times in manifest?

There is some block of code that is added multiple times. Remove the duplicate code which is added in your Manifest file. Sync your project and then run your app to solve this issue. When we are adding a new dependency make sure to check the dependency requirements such as minSDK version and targetSDK version which are required for this dependency.

Why is my App/project failing to deliver certain features to end-user?

You may encounter this error if your app/project uses Google Play Services to deliver certain features to the end-user as Android 2.2 is required by the Google Play Services, which is version 8 of SDK. Change your minSDK Version to be at least at 8 like the code sample below:


Video Answer


1 Answers

I just experienced this myself while checking java16 compatibility with Ankidroid (link because it is open source, you can reproduce yourself if you like).

I would guess you are attempting to use java16 to compile your app?

As of this writing (April 16, 2021) Android Gradle Plugin is not compatible with java16 - not 4.1.3, 4.2.0-rc01 nor 7.0.0alpha14 (all the current versions as I write this.

If you use java8 or java11 it works.

Android Studio uses java11 internally now for 4.2.x so that is the safest bet at this point for Android development.

I have logged this upstream issue so Google is aware, and others may track it in case there is a good workaround/explanation/reason https://issuetracker.google.com/u/1/issues/186806275

like image 122
Mike Hardy Avatar answered Oct 20 '22 03:10

Mike Hardy