Intellij Invalid Gradle JVM Configuration

Viewed 18560

Environment:
Java version: 14.0.1
Gradle version: 6.4
Intellij version: 2020.1.1

I have a valid Java installation. I have set JAVA_HOME to point to the Java installation directory.
Everytime when I tried to start new project ( Gradle project ) in Intellij, I will always got an error like one in the picture.

Why Intellij keep using Gradle version 6.1? My Gradle installation is 6.4.
Due to this error, Intellij dont even create any Gradle files like gradlew, gradlew.bat or gradle folder

Here the error:

Error

Here the setting:

Setting

Any idea how to fix this?

3 Answers

Image says that you don't have a gradle-wrapper.properties file. You should create gradle folder and wrapper folder inside it. In Wrapper folder you need two files gradle-wrapper.properties and gradle-wrapper.jar.

Gradle website

There is an issue when you select JDK 14 version IDE will fail to create a project since used by default gradle wrapper version is not compatible with 14 JDK. The workaround is to use lower JDK for new project or use 6.3 Gradle version (specify it in IDE Gradle settings: Settings (Preferences on macOS) | Build, Execution, Deployment | Build Tools | Gradle | Use Gradle from).

It will be fixed in next IDE update.

I was making a Spring Boot application on Windows with Intellij and the project directory resides on WSL Ubuntu. And got a similar message.
Found invalid Gradle JVM configuration: Platform SDK does not point to valid JDK (\\wsl$\Ubuntu-20.04\usr\lib\jvm\java-8-openjdk-amd64)

I ignored it and the program still ran.

Related