Android Studio Could not find runProguard () method for arguments?

/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bin/java "- com.intellij.rt.execution.application.AppMain org.gradle.launcher.GradleMain --build-file /Users/Tom/Documents/Git_open_sources/android-material-drawer-template/app/build.gradle FAILURE: Build failed with an exception. * Where: Build file '/Users/Tom/Documents/Git_open_sources/android-material-drawer-template/app/build.gradle' line: 16 * What went wrong: A problem occurred evaluating project ':app'. > Could not find method runProguard() for arguments [false] on BuildType_Decorated{name=release, debuggable=false, testCoverageEnabled=false, jniDebuggable=false, pseudoLocalesEnabled=false, renderscriptDebuggable=false, renderscriptOptimLevel=3, applicationIdSuffix=null, versionNameSuffix=null, minifyEnabled=false, zipAlignEnabled=true, signingConfig=null, embedMicroApp=true, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}}. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 6.741 secs Process finished with exit code 1 



 apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.0" defaultConfig { applicationId "com.poliveira.apps.materialtests" minSdkVersion 11 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:support-v4:21.0.0' //noinspection GradleDependency compile "com.android.support:appcompat-v7:21.0.0" compile 'com.android.support:recyclerview-v7:21.0.0' } 
+55
android android-studio android-gradle
Dec 01 '14 at 17:25
source share
6 answers

I had the same problem after updating Android Studio to 1.0 RC 3. I could not import the project into the new version. I had to create a new project and manually add files to the new project from the previous project.

After that, I found a change in the gradle build file.

Here is the change:

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

Instead of "runProguard false" use "minifyEnabled false"

+153
Dec 05 2018-11-14T00: 00Z
source share

There is an update from Android Studio, you need to transfer Gradle configurations: http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0

  • Replace runProguard with minifyEnabled
  • Replace zipAlign with zipAlignEnabled
  • etc...
+27
Dec 09 '14 at 20:15
source share

Instead of using runProguard in your gradle file, try using minifyEnabled. This should solve the problem. runProguard is deprecated and will soon stop working.

NOTE. - To use minifyEnabled, gradle must be upgraded to version 2.2 or higher.

+8
Dec 07 '14 at 12:13
source share

Works for me (after upgrading to 1.0 "final"):

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

It is also necessary to update: Gradle 2.2 (or higher), "SDK-Tools", Support Repository, Support Library, Services, Services, etc., etc.,

+6
Dec 12 '14 at 8:48
source share

don't forget to change all renderscriptSupportMode to renderscriptSupportModeEnabled!

Also who in all your libs projects

+2
Dec 27 '14 at 0:30
source share

you need to do a couple of things to go from 0.9 to 1.0 see http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0

0
Feb 01 '15 at 12:24
source share



All Articles