Last Update November 6, 2020: We improved the overall article.

If you are recently update on your android studio to be a uptodate version than may be you can face
this common problem on your previews android studio project. The project compiled before without any changes in that file, you are getting this error

Error:(26, 0) Gradle DSL method not found: 'runProguard()'

Gradle DSL

Solution

Instead of using runProguard in your gradle file, try using minifyEnabled.
Note: To use minifyEnabled, gradle should be updated to version 2.2 or above.
Open build.gradle on your root project file .
Old Line runProguard false make it change to

buildTypes {
    release {
        runProguard false // this line has to be changed
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

Advertisment

New line minifyEnabled false Add this line

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

Migrating Gradle Projects to version 1.0.0. everything is described here:
http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0


New Release Note

Fully Understand New Build System Please Read the Official blog New build system inside ADT and Ant
Handle local jars in tests of multidex-enabled library projects
Fix path normalization (for unzipped aars) when path is only 1 char long
Fix Jack/Jill memory setting through dexOptions.javaMaxHeapSize

Advertisement
Previous articleTop Place to Learn Programming in Online
Next articleHow to Use Your Laptop as a Wi-Fi Hotspot – mHotspot
Abdullah Al Mahamud has always been fascinated by the world and is a writer because he wants to share her love of travel with others. He has written for thedevline since 2016, specializing in modern real-life writing about fashion, arts & culture, technology tips, and more! When not writing articles for us at The dev line (which doesn't happen often!), he enjoys exploring both scenic beauty around the globe as well as intellectual topics that help other people become happier. like productivity hacks or ways to save on your grocery bill.