Ubuntu – Intellij Idea Community Edition, cannot set `Gradle home`

gradleintellijjava

I installed Gradle from the repository. Then I downloaded Intellij Idea Community Edition from the official website and installed it.

I set the Java JDK and now I am trying to open a Gradle Project, but the problem is that it doesn't accept my Gradle home:

enter image description here

~/Documents/idea-IC-141.2735.5/bin$ whereis gradle
gradle: /usr/bin/gradle /usr/share/gradle /usr/share/man/man1/gradle.1.gz

What's wrong?

Edit: now I can choose the first option Use default gradle wrapper (recommended)

Probably because I restarted, I don't know

Best Answer

In Gradle home option you need provide path to folder where your Gradle distribution was installed.

To determine the Gradle home location of your Gradle installation:

  1. Create build.gradle containing:

    task getHomeDir << {
        println gradle.gradleHomeDir
    }
    
  2. Run

    gradle getHomeDir
    

Reference: Setting up Gradle Plugin For IntelliJ

Related Question