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


i'm using android studio 0.9.3 gradle 'com.android.tools.build:gradle:0.14.+'

apply plugin: 'com.android.application'

android {     compilesdkversion 19     buildtoolsversion '20.0.0'      defaultconfig {         applicationid "xxx.xxx.xxx"         minsdkversion 16         targetsdkversion 19         versioncode 1         versionname "1.0.11"     }      signingconfigs{         releaseconfig{             storefile file("xxxxxxx")             storepassword = "xxxx"             keyalias = "xxxx"             keypassword = "xxxx"         }     }      buildtypes {         release {             runproguard false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'             signingconfig signingconfigs.releaseconfig              // adds version file name             applicationvariants.all { variant ->                 def file = variant.outputfile                 variant.outputfile = new file(file.parent, file.name.replace(".apk", "-" + defaultconfig.versionname + ".apk"))             }         }     } }  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     // must install or update support repository through sdk manager use dependency.     // must install or update support repository through sdk manager use dependency.     // must install or update google repository through sdk manager use dependency.     // must install or update support repository through sdk manager use dependency.     compile 'com.android.support:support-v4:19.+'     compile 'com.android.support:appcompat-v7:19.+'     compile 'com.mcxiaoke.volley:library:1.0.6'     compile 'com.google.code.gson:gson:2.2.+' } 

the project compiled before without changes in file, i'm getting: error:(26, 0) gradle dsl method not found: 'runproguard()'

how fix that?

as far know runproguard replaced minifyenabled. still not sure how define config proguard google search should find out.

edit:

for outfile read here: https://groups.google.com/forum/#!topic/adt-dev/4_-5nvxufb0 how it.

in short: used more complex version:

applicationvariants.all { variant ->      variant.outputs.each { output ->          def apk = output.outputfile;         def newname;          // newname = apk.name.replace(".apk", "-v" + defaultconfig.versionname + "-" + variant.buildtype.name.touppercase() + ".apk");         if (variant.buildtype.name == "release") {             newname = apk.name.replace(".apk", "-v" + defaultconfig.versionname + "-release.apk");         } else {             newname = apk.name.replace(".apk", "-v" + defaultconfig.versionname + "-beta.apk");         }          output.outputfile = new file(apk.parentfile, newname);          if (output.zipalign) {             output.outputfile = new file(apk.parentfile, newname.replace("-unaligned", ""));         }          logger.info('info: set outputfile ' + output.outputfile + " [" + output.name + "]");     } } 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -