Intellij:无法在“添加框架支持”中选择“Groovy”

时间:2018-04-13 05:20:58

标签: intellij-idea groovy frameworks ide

我想在Intellij Idea 2018.1中为我的项目添加Groovy支持。但是,当我从项目上下文菜单中打开“添加框架支持...”时,我在框架列表中看不到“Groovy”:

enter image description here

我在我的机器上安装了Groovy并将其配置为IntelliJ中的全局库:

enter image description here

不确定这是否可行,但我也无法将Groovy添加为SDK:

enter image description here

我添加了Groovy作为模块依赖:

enter image description here

我的根本问题是IntelliJ无法正确识别Groovy代码,例如:我得到了

Cannot resolve symbol `String`

当我使用String类时:

enter image description here

关于如何将Groovy作为框架和SDK提供的任何提示?

解决方案

感谢CrazyCoder将我指向破坏的JDK。修复JDK并将Groovy添加为模块依赖项修复了问题。见https://www.jetbrains.com/help/idea/creating-and-managing-modules.html

0 个答案:

没有答案