udarts
udarts

Reputation: 886

updating Gradle won't work at all

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.

Upvotes: 5

Views: 7690

Answers (2)

Fakher
Fakher

Reputation: 2128

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.

Upvotes: 1

Sneh Pandya
Sneh Pandya

Reputation: 8483

  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
    

Upvotes: 5

Related Questions