How To Fix General Error During Semantic Analysis: Unsupported Class File Major Version 60

A recent issue that has been affecting users of the Eclipse IDE is a General error during semantic analysis: Unsupported class file major version 60

This issue can cause many problems, such as errors in the code editor, problems launching or debugging applications, and more. Fortunately, there are some methods to fix this issue. Let’s scroll down to explore now!

Why Did General Error During Semantic Analysis: Unsupported Class File Major Version 60 Error Happen?

If you open an older project in IntelliJ IDEA that was created in a newer version of the IDE and get the following error: 

Here is the message: “General error during semantic analysis: Unsupported class file major version 60.” 

It means that your project contains classes or resources that are no longer supported. The solutions for this error are simple, and you can find them in the following section. 

3 Amazing Methods To Fix The Error

Method 1

When you build with Gradle, the default JVM is used. However, you can change the JVM used by Gradle. This can be helpful if you want to use a different JVM or if you are experiencing problems with the default JVM.

If you want to change the Gradle JVM, go to Build, Execution, Deployment, and use the Gradle JVM option to check the Gradle version. There are several different Gradle versions that you can use. You can also choose the Java VM.

Method 2

You can follow our instructions as below. 

1. Open the Gradle/wrapper/gradle-wrapper.properties file. 

2. Change “distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip” to “distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip”. 

3. Save the file and close it. 

4. Close and reopen your terminal window (or command prompt).

5. Type “gradle wrapper” and press enter to run the Gradle Wrapper script. 

6. The script will download Gradle 7 if you don’t have it installed already, and then upgrade your Gradle installation to version 7.

Method 3

Upgrading Gradle from version 6.8.3 to 7.0 will solve your problem successfully. You can upgrade it by selecting the Gradle Projects option and clicking Project Structure. 

You will find Change Gradle Version 7.0 near the bottom on the left panel. It works well with Android Gradle Plugin version 4.2.0.

Conclusion

In conclusion, there are several ways to fix General Error during semantic analysis: unsupported class file major version 60. One is to update the class file to a supported version. Still, another is to upgrade the Gradle. 

Each fixing solution has its own benefits and drawbacks, so it is essential to identify which approach will work best for each project. Thank you for your reading! See you again in the next post.


Related articles

Scroll to Top