Error in android development, gradle build failed - java

So, ever since I updated my repository from my group, I got this error, however, when I looked at the commits all that changes in the built-in files are the version of gradle and jdk. I've searched and done possible solution regarding the app:processDebugMainMAnifest and I just don't know how I can resolve this problem.
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 #645de77a

Related

Getting error in the .print() of Flink in java in eclipse

While trying to execute a basic Flink program in eclipse, I'm getting error due to .print() called by datastream_name.print() for printing my datastream.
using Java8
ERROR
Exception in thread "main" java.lang.reflect.InaccessibleObjectException: Unable to make field private final byte[] java.lang.String.value accessible: module java.base does not "opens java.lang" to unnamed module #776aec5c
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:180)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:174)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:106)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:132)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:132)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:69)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.clean(StreamExecutionEnvironment.java:2139)
at org.apache.flink.streaming.api.datastream.DataStream.clean(DataStream.java:203)
at org.apache.flink.streaming.api.datastream.DataStream.addSink(DataStream.java:1243)
at org.apache.flink.streaming.api.datastream.DataStream.writeUsingOutputFormat(DataStream.java:1144)
at org.apache.flink.streaming.api.datastream.DataStream.writeAsText(DataStream.java:1004)
at orgname.testProjectFlink.App.main(App.java:19)
What is the flink version?
Beginning from flink1.15, the support of Java 8 is now deprecated and removed (FLINK-25247). The Flink community recommends all users migrate to Java 11.

IntelliJ build failed but it works at second time

It is weird that when I build my code in IntelliJ IDEA. The first time always has an internal error.
It shows like :
"Internal error (java.lang.reflect.InaccessibleObjectException): Unable to make protected void java.util.ResourceBundle.setParent(java.util.ResourceBundle) accessible: module java.base does not "opens java.util" to unnamed module #6b4a4e18".
It will work for the second time. There is nothing wrong with my code because it is just a simple "hello, world". Is there anything I can do? It is so convenient I need to run twice every time.

Flutter :app:processDebugMainManifest error when running app

I'm developong a flutter mobile application but whenever I try to run it, it throws the following :app:processDebugMainManifest error:
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 #7ea904ce
When I run flutter doctor the only issue is android studio not being installed (despite being installed).

Cannot run a HelloWorld on Intellij Idea (java.lang.IllegalAccessError)

I wanted to just run HelloWorld on Intellij Idea which is failed.
Java Version is "9-ea" in my macOS.
Error:Internal error: (java.lang.IllegalAccessError) class com.intellij.util.io.FileChannelUtil (in unnamed module #0x6ecc4cd7) cannot access class sun.nio.ch.FileChannelImpl (in module java.base) because module java.base does not export sun.nio.ch to unnamed module #0x6ecc4cd7
java.lang.IllegalAccessError: class com.intellij.util.io.FileChannelUtil (in unnamed module #0x6ecc4cd7) cannot access class sun.nio.ch.FileChannelImpl (in module java.base) because module java.base does not export sun.nio.ch to unnamed module #0x6ecc4cd7
at com.intellij.util.io.FileChannelUtil.setupUnInterruptibleHandle(FileChannelUtil.java:26)
......
Please make sure to use the release JDK version, not ea and update to the latest IntelliJ IDEA version.
I had the same error and the solution I've found was to downgrade my Java version (JDK) from 16 to 11. Then, it worked :)

Java's add-opens doesn't seem to make a package accessible

I am trying to access JavaFX's package-private class & public static method in it (javafx.scene.control.skin.TableSkinUtils.resizeColumnToFitContent), so that I can resize TableView's columns automatically.
However, I'm using the module system since it seems that JavaFX 11 requires my app to be a module. If I don't specify a module for my app, I get this error: Error: JavaFX runtime components are missing, and are required to run this application I'd actually prefer to not use the module system at all, is there a way?
Now, due to the module system, I get an exception when attempting to make the method TableSkinUtils.resizeColumnToFitContent accessible:
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make public static void javafx.scene.control.skin.TableSkinUtils.resizeColumnToFitContent(javafx.scene.control.skin.TableViewSkinBase,javafx.scene.control.TableColumnBase,int) accessible: module javafx.controls does not "opens javafx.scene.control.skin" to module Explorer
So, I tried to add this workaround: --add-opens javafx.controls/javafx.scene.control.skin=ALL-UNNAMED to Intellij's run configuration VM options.
However, with or without the above, I get the same exception.
What am I possibly doing wrong?

Categories

Resources