0

Hi everyone am new to Kotlin language , i have encountered some errors in the process of running the Hello World code.

Could not open init generic class cache for initialization script 'C:\Users\HP\AppData\Local\Temp\wrapper_init.gradle' (C:\Users\HP.gradle\caches\6.8\scripts\5mjee5vr2mabvvexqryui51pg).

BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Any help will be appreciated. Thanks in advance

  • 1
    "Unsupported class file major version 60" means you are using a file compiled for Java version 16 (or later) under a JVM with an older version. Maybe https://stackoverflow.com/questions/67079327/how-to-fix-unsupported-class-file-major-version-60-in-intellij will help. – Alexey Romanov Jun 13 '21 at 08:19

1 Answers1

2

I caught this problem by downloading a different version of Java. I had version 16 installed, however the IDE (IntelliJ) warned me that Gradle was not compatible with this latest version, so I installed version 11. If the configuration of the project points to version 11, and that error that you show in console was corrected.

Here is the link to the OpenJDK: https://jdk.java.net/archive/

Michael Piefel
  • 18,660
  • 9
  • 81
  • 112
Dissek Razziel
  • 151
  • 1
  • 5