I have installed IntelliJ and I need to import a Gradle project.
I have build the gradle project using command prompt with the gradlew build command.
At the IntelliJ welcome page, I have proceeded with proper instructions, and when I choose "Finish". I get the following error:
Invalid Gradle JDK configuration found. Open Gradle Settings JAVA_HOME ennvironment variable not set.
When I click on "Open Gradle Settings" it pop up with error of Not found with a path under IntelliJ directory in Program files and searching in jre/jre/bin/….etc.
Best Answer
Deleting
.gradle
and.idea
will likely solve the problem.So:
.gradle
and.idea
These two must be generated locally on your PC and not pulled from a remote or somewhere else (Also they should be in
.gitignore
).In my case the reason was that these two folders were generated on another computer and I had opened a project with these two folders existing before.