General error during semantic analysis: Unsupported class file major version 57

This is not a LibGDX issue. Gradle 5 is incompatible with Java 13. You either need to update Gradle (the wrapped version in your project) to Gradle 6 or later, or you need to use a lower version of the JRE.

To update the wrapped gradle, go to gradle/wrapper/gradle-wrapper-properties in your project and update the version number. I’m using 6.1.1.

distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

If you have an older LibGDX project, you might have to modify the build.gradle file in the android module to be compatible with Gradle 6. You can copy-paste to replace the copyAndroidNatives task with the one here.

Leave a Comment

tech