dependencies {
classpath 'com.android.tools.build:gradle:8.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
allprojects {
repositories {
google()
mavenCentral()
This is in my build.gradle file. I tried several different gradle versions but none worked
Don’t confuse Gradle versions with Android Gradle Plugin versions.
The latest Gradle version is 8.0.1.
But the latest Android Gradle Plugin version is 7.4.2.
General error during conversion: Unsupported class file major version 63
Now this error comes up, after I changes the gradle version back to 7.4.2, with this being the updates build.gradle file:
buildscript {
repositories {
mavenCentral()
google()
dependencies {
classpath ‘com.android.tools.build:gradle:7.4.2’
classpath “org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version”
Again, you did not change the Gradle version, you changed the version of the Android Gradle Plugin.
But what Gradle version are you using? I guess something below 7.6. Because your message now says that you want to use Java 19 stuff with something that is not compatible with Java 19 like Gradle versions below 7.6: Compatibility Matrix
So if my assumption is right, either use an older Java version that is supported, or use a newer Gradle version.
yes, thank you, that worked now! But now I got this mistake. Could you help me there please?
A build operation failed.
Could not resolve all files for configuration ‘:path_provider_android:androidApis’.
Could not resolve all files for configuration ‘:path_provider_android:androidApis’.
Failed to transform android.jar to match attributes {artifactType=android-mockable-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime, returnDefaultValues=true}.
Execution failed for MockableJarTransform: C:\Users\finni\AppData\Local\Android\sdk\platforms\android-31\android.jar.
Cannot create mockable android.jar
C:\Users\finni\AppData\Local\Android\sdk\platforms\android-31\android.jar
No, I have no idea about Android.
You might better ask in some Android community about it.
And you might check whether --info
and --stacktrace
maybe give more information about the problem.