1

I have updated my Gradle version from 4.6 to 4.10.1 but I am getting an error

"Minimum supported Gradle version is 4.10.1. Current version is 4.6."

I have manually updated the grade version of cache.properties and deleted 4.6 related folders under .gradle dir but still same problem.

My build.gradle

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.2'
}

And gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2[![enter image description here][1]][1]-all.zip

Added Screenshot enter image description here

Diptendu Das
  • 2,142
  • 3
  • 17
  • 33

4 Answers4

2
  • Try File -> Invalidate Caches / Restart... and
  • Check File -> Project Structure -> Project. The Gradle version should be 4.10.1 and the plugin version should be 3.3.2 for your case. See:

    enter image description here

Also, try to run build from command line using gradle wrapper gradlew, e.g.

./gradlew assemble

See: What is real Android Studio Gradle Version?

shizhen
  • 10,269
  • 9
  • 43
  • 73
1

Check your Android Studio preferences for does it use default gradle wrapper.

Dmytro Batyuk
  • 909
  • 7
  • 15
0

Had the same problem. Just Sharing how I fixed this problem.

To resolve this issue close Android Studio and delete the following directory's content, necessary files will be downloaded on IDE's next launch.

macOS: ~/.gradle/wrapper/dists

Linux: ~/.gradle/wrapper/dists

Windows: C:\Users\your-username.gradle\wrapper\dists

  • Restarted Android Studio and it worked like a charm.
  • this is my distribution URL in Gradle wrapper distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip but AS downoading gradle 4.6 – Diptendu Das Apr 11 '19 at 08:10
0

Go the project location and open terminal that location and do the following command First ./gradlew clean Then ./gradlew assembleDebug

N.B. Make sure you are connected to internet

Md Juyel Rana
  • 492
  • 4
  • 10