updating Gradle won't work at all
Asked Answered
S

2

5

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.

Spirelet answered 3/11, 2017 at 11:19 Comment(1)
Did you change the gradle/wrapper/gradle-wrapper.properties ?Indiana
O
5
  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
    
Orthopteran answered 3/11, 2017 at 11:25 Comment(1)
Arg, I was looking at the gradle inside the app folder, in the {root}/gradle the distributionUrl was still the old one. Changed it and it works. ThanksSpirelet
P
1

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.

Pycnidium answered 3/11, 2017 at 12:48 Comment(1)
Tried this and getting the following error: Task 'wrapper' not found in project ':app'.Spirelet

© 2022 - 2024 — McMap. All rights reserved.