Could not initialize class com.intellij.pom.java.LanguageLevel kotlin code example

Example: Could not initialize class com.intellij.pom.java.LanguageLevel

Still have no idea what the issue is. I tried all the suggestions I could find online and everything I could think of: Install a different version of java, install a different IDEA, try using the original cryptography policy files, try using the unlimited strength policy files and more. None of these worked.

What did work, however, was selecting "Use a local gradle distribution", instead of using the default wrapper. I gave it my gradle install path (/usr/local/gradle-2.3), found by running which gradle (that will give you the path to the executable, namely /usr/local/gradle-2.3/bin/gradle, but I just took the directory part). Now I can build using gradle!!

My best guess is that the gradle plugin installed some other distribution of gradle that wasn't set up properly for my project.

I hope this is helpful to anyone else struggling with using gradle in Intellij IDEA

Tags:

Misc Example