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"toyour-app-project\your-app-name\.gradle\2.10 -
Change the
classpathofyour-app-project\your-app-name\build.gradleto
classpath 'com.android.tools.build:gradle:2.1.2' -
Replace
runProguardofyour-app-project\your-app-name\app\build.gradlebyminifyEnabled -
Click Retry on the error reminder or Reopen your Android Studio and project.
I am using the latest versions of Android Studio and Gradle.