MOHAMED SAID NOORKEY
MOHAMED SAID NOORKEY

Reputation: 11

"Could not open init generic class cache for initialization script"

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

Any help will be appreciated. Thanks in advance

Upvotes: 1

Views: 6535

Answers (1)

Dissek Razziel
Dissek Razziel

Reputation: 181

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/

Upvotes: 3

Related Questions