Migrating to Android Studio 1.0.0 – missing method “runProguard”

When I updated Android Studio to the 1.0.0 release, I found the Gradle project sync was no longer working. A quick look at the messages revealed it wasn’t happy with the method “runProguard”.

Error:(16, 0) Gradle DSL method not found: 'runProguard()'
Possible causes:
The project '<AppName>' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file
The build file may be missing a Gradle plugin.
Apply Gradle plugin

According to the Android build system documentation migration guide, it has been replaced with minifyEnabled. You’ll need to open the build.gradle file for your app and correct it like this:

  buildTypes {
 release {
 -runProguard false
 +minifyEnabled false
 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
 }
 }