Error "Minimum supported Gradle version is 5.1.1. Current version is 4.4.1" after update android studio

Solution 1:

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.

Solution 2:

This was my solution.

My_project
  /gradle
  /wrapper
  /gradle-wrapper.properties 

Modify this line with the Gradle 5.1.1

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

Solution 3:

Finally, I was able to solve this dropping the folders of the oldest version in ~/.gradle/wrapper/dists and leave only the gradle-5.1.1-all

Solution 4:

In my case, gradle failed to download the version I specified though I tried all previous solutions.

Apparently, I was opening my project by selecting "MyProject/App" directory. Gradle successfully updated when I opened the same project by selecting the "MyProject" folder.

Solution 5:

  1. Check your full project and find all "Gradle-wrapper.properties" files. If your project has multiple modules then there are chances of having multiple. and set -

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

  1. Gradle sync

  2. If not done then invalidate the cache and restart the project.

  3. Still not working then go to your root directory on Linux and find .gradle folder. Delete it and restart the android studio.