How to define Gradle's home in IDEA?

后端 未结 16 574
太阳男子
太阳男子 2020-12-04 04:37

I am trying to import a Gradle project into IntelliJ, and when I get to the Gradle Home textbox, it is not automatically populated, nor will typing in the path

16条回答
  •  [愿得一人]
    2020-12-04 05:25

    This is instruction for MAC only. I had the same problem. I solved it by configuring $GRADLE_HOME in .bash_profile. Here's how you do it:

    • Open .bash_profile (usually it's located in the user’s home directory).
    • Add the following lines to update $PATH variable: export GRADLE_HOME=/usr/local/opt/gradle/libexec export PATH=$GRADLE_HOME/bin:$PATH
    • Save it.
    • Apply your changes by running source .bash_profile

    I wrote my own article with instruction in a case if somebody will encounter the same problem.

提交回复
热议问题