I fixed the error by changing the following things.
- Open the file under your-app-project\your-app-name\gradle\wrapper\gradle-wrapper.properties
-
replace the old URL path by this one:
distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip -
Rename the folder name from “…\1.12” to your-app-project\your-app-name.gradle\2.10
-
Change the classpath of your-app-project\your-app-name\build.gradle to
classpath ‘com.android.tools.build:gradle:2.1.2’ -
Replace runProguard of your-app-project\your-app-name\app\build.gradle by minifyEnabled
-
Click Retry on the error reminder or Reopen your Android Studio and project.
I am using the latest versions of Android Studio and Gradle.