updating Gradle won't work at all

Viewed 5367

I am trying to update Gradle to version 4.1 (or 4.3). As the current version is 2.14.1 I have tried almost everything, but Gradle just won't update. Have checked settings, repository, dependency, etc, all seem as it should. I also tried restarting Android studio. But still getting the: Error:(1, 0) Minimum supported Gradle version is 4.1. Current version is 2.14.1.

It is driving me insane.

2 Answers
  1. Go to {root}/gradle
  2. Open gradle-wrapper.properties file
  3. Set your distributionUrl to:

    distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
    

try to run this command:

gradle wrapper --gradle-version 4.3

It will update your gradle wrapper version

[Update] If this command doesn't work. Add this block to your build.gradle project level.

task wrapper(type: Wrapper) {
gradleVersion = 4.3
}

and then run the previous command.

Related