Gradle sync failed: Unable to find method

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.

Leave a Comment