Search code examples
javagradlejava-home

How can i change the Gradle Version in InteliJ?


I have the Error: "Found invalid Gradle JVM configuration" "JDK 17.0.1 isn´t compatible with gradle 7.1. Please fix JAVA_HOME enviroment variable"

Im not sure why it says gradle 7.1. The gradle Version i have is 7.4.2. This version should work with JDK 17


Solution

  • Take a look at the gradle-wrapper.properties file in the ./gradle/wrapper directory.

    In the file, you can define the distribution URL from which Gradle is loaded. For example:

    distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
    

    As far as I know, IntelliJ adopts the version.

    According to the Gradle documentation, Gradle 7.3 is the first Gradle version that supports JDK 17. You could try that one.