Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ error - could not open init generic class cache for initialization script

Tags:

kotlin

enter image description here

enter image description here

I was trying to download IntelliJ and learn Kotlin, but i get a BUG error before i am starting, and i dont now what to do..

  • I have try to delete the scipts folder, but it just make a new scipts folder, and say the same error. I have also reinstall IntelliJ, and thats give the same error.

Is der someone there can help me? :-)

Could not open init generic class cache for initialization script 'C:\Users\username\AppData\Local\Temp\wrapper_init4.gradle' (C:\Users\username.gradle\caches\6.6.1\scripts\3yb5naxddghzghazzdf2vk0em).

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

like image 985
Walder_96 Avatar asked Aug 27 '26 16:08

Walder_96


1 Answers

As per the details in your error message, you can see that the root cause is a gradle error.

Gradle is likely using an unsupported version of the JVM in your case (e.g. I could reproduce the error in the latest IntelliJ 2021.3 version where gradle was using JVM 17 from my home path, while the IDE itself was using JDK 11.) In the attached IntelliJ Preferences screen, note that the JVM used by Gradle is specified separately.

To fix the error, verify the JVM version being used by gradle and specify a JVM 11 version to gradle.

IntelliJ Gradle Preferences Screenshot:

IntelliJ Gradle Preferences Screenshot

like image 93
PiC Avatar answered Aug 31 '26 08:08

PiC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!