📜  无法初始化类 com.intellij.pom.java.LanguageLevel - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:04.040000             🧑  作者: Mango

代码示例1
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