I have an Ionic Cordova Angular project. I received an email from Google asking me to target Android 14 (API 34), so I tried to do this by updating android-targetSdkVersion to 34 and cordova-android to version 13.0.0 (Cordova Android 13.0.0 Released! – Apache Cordova 1).
Unfortunately, I’m still stuck with this error message when I try to build for Android:
Reading build config file: C:workspaceantdevbuild.json
FAILURE: Build failed with an exception.
-
Where:
Settings file ‘C:workspaceantdevplatformsandroidtoolssettings.gradle’ -
What went wrong:
Could not compile settings file ‘C:workspaceantdevplatformsandroidtoolssettings.gradle’.
startup failed:
General error during semantic analysis: Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61
I’m using Java 17. I’m at a loss and don’t know what to do anymore.
When I open Android Studio, I see two gradle-wrapper.properties files (android/gradle/wrapper/gradle-wrapper.properties and android/app/gradle/wrapper/gradle-wrapper.properties) with distributionUrl=https://services.gradle.org/distributions/gradle-8.5-bin.zip.
Do you have any idea how to solve my problem?
Any help would be appreciated. Thank you!
I tried with Java 16, but the error message is still there (except it says 60 instead of 61).
ant is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.