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

We Are Going To Discuss About General error during semantic analysis: Unsupported class file major version 57. So lets Start this Java Article.

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

  1. 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.

  2. 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.

Solution 1

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.

Original Author Of This Content

Solution 2

startup failed:
General error during semantic analysis: Unsupported class file major version 61

how to fix this react native issues
JAVA JDK 17

Go to the android/ directory of your react-native project

Create a file called local.properties with this line:

sdk.dir=C:\Android\sdk

GOTO
android\gradle\wrapper\gradle-wrapper.properties

CHANGE

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

TO

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

GOTO

android\gradle.properties
add this line

org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED

Original Author Of This Content

Solution 3

Check gradle version and bundle version using the following link
Link https://developer.android.com/studio/releases/gradle-plugin#updating-gradle

If you want to upgrade android/gradle/build.gradle change dependencies classpath ‘com.android.tools.build:gradle:[latest version]

Original Author Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment