Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Android Data Persistence Introduction to Data Persistence Introduction to the Starter Kit

Abdelrahman Ibrahim
Abdelrahman Ibrahim
1,575 Points

Compilation Error

Error:(15, 0) Gradle DSL method not found: 'runProguard()' Possible causes:<ul><li>The project 'MemeMaker' may be using a version of Gradle that does not contain the method. <a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin. <a href="apply.gradle.plugin">Apply Gradle plugin</a></li>

2 Answers

Tom Schinler
Tom Schinler
21,052 Points

I am using the latest version of Android Studio, and assume you are using at least Android Studio 1.0. If that is the case here is what I found to fix the issue.

If you are having an issue with the VCS system go to File>Settings>Version Control and remove the project from the VCS system. This may or may not apply to you. On to your issue.

So the first thing you have to do is fix the plug-in version number. In the file Gardle>build.gradle (there is 2 build.gradle files. One is under the app directory and the other is in the gradle directory. this one is in the gradle directory) is :

dependencies {
        classpath 'com.android.tools.build:gradle:0.12.+'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

if you replace the classpath line with:

classpath 'com.android.tools.build:gradle:1.0.1'

That will solve the first issue. Then after you resolve that and sync gradle, you will be given an error referencing runProguard() This is because runProguard has been replaced with minifyEnabled. so to fix this you must open the file app>build.gradle (make sure you are using the file nested inside of the app directory for this) and the file will look like this:

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion '20.0.0'
    defaultConfig {
        applicationId 'com.teamtreehouse.mememaker'
        minSdkVersion 16
        targetSdkVersion 19
        versionCode 1
        versionName '1.0'
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/commons-io-2.4.jar')
    compile 'com.android.support:support-v13:19.0.+'
}

here you just need to replace the line

runProguard false

with

minifyEnabled false

re-sync gradle and everything should start working properly. Now you can get on with the course. Have fun!

Charles Li
Charles Li
15,557 Points

Thanks a lot! Now I can finally get on with the course!

Harry James
Harry James
14,780 Points

Thanks for the fix Tom!

As your answer has helped out a majority of users, I have gone ahead and marked it as the Best Answer.

I've also put together a new file with your fixes and credited you for them in the comments. Any users wishing to download a pre-ready file can do so here.

There are instructions as to how you import the project in the zip file :)

Abdelrahman Ibrahim
Abdelrahman Ibrahim
1,575 Points

Thanks Tom Schinler for your help. I replaced "runProguard false" with "minifyEnabled false" and works fine.

best regards.