Gradle sync failed: Unable to find method

Solution 1:

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.

Solution 2:

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)

Solution 3:

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.