Error while build with java 16 and gradle 7.0 - java

i tried to build my project with gradle and java 16.
While building the project i get the following error:
Caused by: java.lang.IllegalArgumentException: error: invalid source release: 16
Does anyone has an idea how i can fix it?

Related

java.lang.RuntimeException: org.gradle.api.internal.provider.MissingValueException

I am trying to build an android project, but it is showing the following errors:
Caused by: java.lang.RuntimeException: org.gradle.api.internal.provider.MissingValueException: Cannot query the value of this provider because it has no value available.
Caused by: org.gradle.api.internal.provider.MissingValueException: Cannot query the value of this provider because it has no value available.
Caused by: com.android.builder.errors.EvalIssueException: Failed to install the following Android SDK packages as some licences have not been accepted.
I am using Android version 2020.3.1 (Arctic Fox) and Gradle version 6.8.3. Can someone please suggest to me what should I do to solve it?

Unable to Run Android Application on Eclipse IDE

I'm just a beginner in Android Development.
I'm Creating my First app by Watching Tutorial.
When i try to run my application it throws an error.
Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'HelloAndroid'.
sun/misc/BASE64Encoder
java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
at com.android.sdklib.internal.build.SignedJarBuilder.<init>(SignedJarBuilder.java:177)
at com.android.sdklib.build.ApkBuilder.init(ApkBuilder.java:446)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:422)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:362)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.finalPackage(BuildHelper.java:391)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.finalDebugPackage(BuildHelper.java:359)
at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:632)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:846)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:229)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:357)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:483)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:565)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:603)
at org.eclipse.core.internal.resources.Project.build(Project.java:124)
at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:1143)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:155)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:803)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:716)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1021)
at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1224)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder cannot be found by com.android.ide.eclipse.base_23.0.7.2120684
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:519)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:171)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
... 23 more
I have tried Almost Every Solution i found on Web.
but all i found is for old version eclipse.
Here i'm Using,
Windows 7
Java SE 16
Eclipse IDE 2021-03 (4.19.0)
If Someone has any Solution for my Configuration then Please help.
Thanks.

sbt test error: java.lang.RuntimeException: /packages cannot be represented as URI

To start, I have reviewed the following response and am still struggling to resolve this issue:
Scala: packages cannot be represented as URI
I still see the following error output when I run sbt test:
error: error while loading String, class file '/modules/java.base/java/lang/String.class' is broken
(class java.lang.NullPointerException/Cannot invoke "scala.tools.nsc.Global$Run.typerPhase()" because the return value of "scala.tools.nsc.Global.currentRun()" is null)
[error] java.io.IOError: java.lang.RuntimeException: /packages cannot be represented as URI
[error] at java.base/jdk.internal.jrtfs.JrtPath.toUri(JrtPath.java:176)
[error] at scala.tools.nsc.classpath.JrtClassPath.asURLs(DirectoryClassPath.scala:204)
[error] at scala.tools.nsc.classpath.AggregateClassPath.$anonfun$asURLs$1(AggregateClassPath.scala:55)
Here is what I'm seeing when I look and my build settings:
I checked my "/Library/ directory and I actually don't see a Java folder at all.
Appears to be a compatibility issue with sbt version and java version.
I ran into a similar error when trying to import a sbt project using sbt version 1.2.7 (in project/build.properties) using openjdk 15
I found that project specified to use if I updated project/build.properties to sbt.version=1.4.7 the error would go away.
I also found I could use older jdk version openjdk 11 with sbt 1.2.7.
Screenshot seems to indicate you are using older version of java 8 and I think latest sbt requires at java 11+, so in your case I suggest upgrading java and trying again.

Error: Could not find or load main class C:.Program Caused by: java.lang.ClassNotFoundException: C:.Program java11, intellij IDEA and javafx 11

I am working on a project using Intellij IDEA, JDK 11 and openjfx 11. everything seems to have been configured properly but when I add the path to the Javafx jar and add the needed javafx modules for my project in the VM options and run the code, I the following error
Error: Could not find or load main class C:.Program
Caused by: java.lang.ClassNotFoundException: C:.Program
when I remove the modules and path configuration from the VM options, i get the following error Caused by: java.lang.ClassNotFoundException: javafx.fxml.FXMLLoader , which I think it's because I don't have
the javafx modules in the vm option which are is required when using javafx11
how do I fix this problem? have i done a wrong configuration? I have combed the internet for the past 24 hours but couldn't get the help I wanted. Looking forward to your help. Thanks

Cordova Build App Issues | JDK | Android Target | avdmanager

I installed latest version of the following tools:
node.js
JDK 8
Android Studio
Cordova
I created an app, however when I try to build for android platform is gives me the following error:
Error: Requirements check failed for JDK 1.8 or greater
If I try cordova requirments,I get the following response:
Requirements check results for android:
Java JDK: installed
Android SDK: installed true
Android target: not installed
avdmanager: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 5 more
Gradle: installed /Applications/Android Studio.app/Contents/gradle/gradle-3.2/bin/gradle
Any idea what else I can try update or fix due to these errors ?

Categories

Resources