Gradle sync failed: Unable to find method

Project >> App >> gradle >> wrapper >> gradle-wrapper.properties

https\://services.gradle.org/distributions/gradle-4.1-all.zip

This will surely work. I was having same issue. Solved by this.


I fixed the error by changing the following things.

  1. Open the file under your-app-project\your-app-name\gradle\wrapper\gradle-wrapper.properties
  2. replace the old URL path by this one: distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip

  3. Rename the folder name from "...\1.12" to your-app-project\your-app-name.gradle\2.10

  4. Change the classpath of your-app-project\your-app-name\build.gradle to classpath 'com.android.tools.build:gradle:2.1.2'

  5. Replace runProguard of your-app-project\your-app-name\app\build.gradle by minifyEnabled

  6. Click Retry on the error reminder or Reopen your Android Studio and project.

I am using the latest versions of Android Studio and Gradle.


edit Project >> App >> gradle >> wrapper >> gradle-wrapper.properties

distributionUrl=http\://services.gradle.org/distributions/gradle-2.10-bin.zip

rebuild the project (restart ide in your mind)


This issue appears when I updated my android studio to 3.1.1

1. I have resolved it by changing: classpath 'com.android.tools.build:gradle:3.1.1' in build.gradle (project)

2. change: distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip in gradle-wrapper.properties. (you can check it in explorer C:\Program Files\Android\Android Studio\gradle\gradle-4.4)