在 IntelliJ IDEA 中配置 Groovy SDK [英] Configuring Groovy SDK within IntelliJ IDEA
问题描述
我正在运行 IntelliJ IDEA 2017.2.3.我通过 Homebrew (OS X) 安装了 Groovy 2.4.12.当我打开 Groovy 源文件(或 Jenkinsfile
)时,我得到以下信息:
I am running IntelliJ IDEA 2017.2.3. I installed Groovy 2.4.12 via Homebrew (OS X). When I open a Groovy source file (or a Jenkinsfile
), I get the following:
Groovy SDK 没有为模块 'my-module' 配置.....配置 Groovy SDK...
Groovy SDK is not configured for module 'my-module' . . . . . Configure Groovy SDK...
单击配置 Groovy SDK..."会引导我进入以下对话框:
Clicking "Configure Groovy SDK..." leads me to the following dialog:
我尝试点击创建..."并选择许多不同的 Groovy 相关文件夹和可执行文件,但没有任何效果.
I tried hitting "Create..." and selecting many different Groovy-related folders and executables, but nothing works.
如何让 IntelliJ IDEA 接受我的 Groovy SDK?
How can I get IntelliJ IDEA to accept my Groovy SDK?
推荐答案
IntelliJ IDEA 期待标准 Groovy SDK 布局,该布局由 https://groovy.apache.org/download.html.直接下载,解压到任意目录,指定这个目录为库的家.
IntelliJ IDEA expects the standard Groovy SDK layout which is provided with the official distributions available at https://groovy.apache.org/download.html. Just download, unpack into any directory, specify this directory as the library home.
Homebrew 包布局可能不同,但在某些情况下,它可能在 libexec
子目录中具有标准布局.尝试 /usr/local/opt/groovy/libexec
(使用 Cmd + Shift + G 导航到它).
Homebrew package layout may be different, however it may have the standard layout in the libexec
subdirectory in some cases. Try /usr/local/opt/groovy/libexec
(use Cmd + Shift + G to navigate to it).
这篇关于在 IntelliJ IDEA 中配置 Groovy SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!