Gradle DSL method not found: ‘runProguard’ error after updating Android Studio

Android Studio 1.0 was released this past week, more than a year and half since the first preview version was made available to developers. Among other changes, the 1.0 release includes an updated version of the Android Gradle plugin, which includes changes incompatible with prior versions. When attempting to build an existing Android Studio project you may encounter an error, such as:

Gradle DSL method not found: 'runProguard'

Renaming instances of the ‘runProguard’ property to ‘minifyEnabled’ resolves this error.  This property was renamed in version 0.14.0, prior to the lastest Android Studio updates, but will be a common error nonetheless because earlier versions of Android Studio have automatically inserted the ‘runProguard’ property into Gradle configuration.

Although ‘runProguard’ is the most likely property to cause errors, there are a number of renamed properties to watch out for:

  • runProguard renamed minifyEnabled
  • zipAlign renamed zipAlignEnabled
  • jniDebugBuild renamed jniDebuggable
  • renderscriptDebug renamed renderscriptDebuggable
  • flavorGroups renamed flavorDimensions
  • packageName renamed applicationId
  • testPackageName renamed testApplicationId
  • renderscriptSupportMode renamed renderscriptSupportModeEnabled
  • ProductFlavor.renderscriptNdkMode renamed renderscriptNdkModeEnabled

For anyone who’s used Android Studio through it’s beta period, an update with breaking changes in the build system are likely no surprise. As Google puts it:

The Android Gradle plugin has been in rapid development, and as features evolved the APIs and the build file description language went through several incompatible changes.

If you’ve been frequently updating Android Studio, then you may have picked up changes in the later beta releasee. If the lure of a one-point-oh release convinced you to update from an earlier version, however, or if you have Android App development projects you haven’t opened up in awhile, then you may be faced with these or other migration challenges. More details on migration to the new Android Studio Build system can be found here: http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0.

Now that Android Studio and it’s build system have left beta status behind, things promise to be more stable moving forward. As Google states:

From version 1.0.0 and going forward, we will strive much harder to not make incompatible changes, and if we do, we plan to write IDE support to help migrate the projects automatically.

Leave a Reply

Your email address will not be published.

top