Android – Error “Minimum supported Gradle version is 5.1.1. Current version is 4.4.1” after update android studio

androidandroid-gradle-plugingradle

I updated android studio from 3.3 to 3.4 version and after install and do ./gradlew lint I am getting the next error:

Deprecated Gradle features were used in this build, making it
incompatible with Gradle 6.0.

Then I use the next command to get more details:

  ./gradlwe build --warning-mode=all

And I get the next message:

Failed to apply plugin [id 'com.android.application']

Minimum supported Gradle version is 5.1.1. Current version is 4.4.1. If using the gradle wrapper, try editing the distributionUrl in .gradle/daemon/4.4.1/gradle/wrapper/gradle-wrapper.properties
to gradle-5.1.1-all.zip

And when I edited my gradle-wrapper.properties, I see that the changes were already done, I.E. the version of the distributionUrl already was gradle-5.1.1.-all.zip

Any idea that how can resolve this?

Best Answer

You could just edit YOUR_APPLICATION_FOLDER/gradle/wrapper/gradle-wrapper.properties and change the last line to: distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip Android Studio will download necessary library.