You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "igorsantos07 (via GitHub)" <gi...@apache.org> on 2024/09/06 03:41:13 UTC
Re: [I] Cordova-Android 13.0.0 build fail with exception: "General error during semantic analysis: Unsupported class file major version 61" [cordova-android]
igorsantos07 commented on issue #1726:
URL: https://github.com/apache/cordova-android/issues/1726#issuecomment-2333175972
I would like to add to the Google Search results that upgrading Gradle, as pointed by Norman, did solve the completely different error message I got, which I must say is the same marked as off-topic from @Krantikc (so I guess it's not _that_off-topic and, I guess, what helped Google bring me here):
> FAILURE: Build failed with an exception.
>
>\* What went wrong:
>Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
>\> Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().
I was running Gradle 4.4.1, which worked fine with SDK 33 and cordova-android 13. When I moved to SDK 34, it complained about JDK 11:
>FAILURE: Build failed with an exception.
>
>\* Where:
>Build file '/home/[...]/my-project-folder/platforms/android/app/build.gradle' line: 20
>
>\* What went wrong:
>A problem occurred evaluating project ':app'.
>\> Failed to apply plugin 'com.android.internal.application'.
> \> Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
> Your current JDK is located in /usr/lib/jvm/java-11-openjdk-amd64
> You can try some of the following options:
> - changing the IDE settings.
> - changing the JAVA_HOME environment variable.
> - changing `org.gradle.java.home` in `gradle.properties`.
Then I upgraded to 17 and that new error started popping up, and it went away with Gradle 8.7, which I downloaded as instructed from that releases' page, and properly placed it above the system one on my `$PATH`.
Thanks, Norman! _(not tagging you, since you definitely are busier enough without having to read messages where you don't need to act upon)_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org