[Android SDK] The project may be using a version of Gradle that does not contain the method… After updating Android Studio

I was using Android Studio 0.8.6, and after updating to 1.0, found this error:

The project <project_name> may be using a version of Gradle that does not contain the method […]

According to this SO answer, changing the method runProguard by minifyEnabled fixed the issue.

1.- Open all the build.gradle files available, on modules “mobile”, “wear”, and any other available.

2.- Change the code

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

with

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

The project should now compile and you should be able to run your old Apps.

Thanks to the authors of the SO answers 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s