Gradle DSL method not found: ' Runproguard () '
As the upgrade, the project will default to your Gradle version to replace the latest version, no backward compatibility, runproguard () can not find
put the Build.gradle in
Buildtypes { Release { runproguard false proguardfiles getdefaultproguardfile (' Proguard-android.txt '), ' Proguard-rules.pro ' } }
Replace with:
Buildtypes { Release { minifyenabled false proguardfiles getdefaultproguardfile (' Proguard-android.txt '), ' Proguard-rules.pro ' } }
For more version questions, refer to:
Http://www.flakor.cn/2014-12-23-849.html?utm_source=tuicool
Upgrading Android Studio to a new version today, no surprises and problems
1,gradle DSL method not found: ' Runproguard () '
The Runproguard function has been deprecated and stopped using the
Change into minifyenabled
The configuration as follows
1 2 3 4 5 6 7 8 |
Buildtypes { release { Minifyenabled false//Alternative way } } |
Runproguard-> minifyenabled
Jnidebuggbuild–> jnidebuggable
Zipalign–> zipalignenabled
2,library projects Cannot set ApplicationID
The new version cannot use ApplicationID to define the package name of the library module, as defined in the manifest
1 2 3 4 5 6 7 |
Defaultconfig { applicationid "cn.flakor.lib" <--- -delete this line minsdkversion targetsdkversion versioncode 1 versionname "1.0" &NBSP;&NBSP;&NBSP;&NBSP;} |
1 2 3 4 |
<manifest xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/ Tools "package=" Cn.flakor.lib "> ... |
Rename package names with flavor
1 2 3 4 5 6 7 |
Android {... productflavors {flavor1 {applicationid ' Cn.flakor.newname '}} |
Reference (do not look over the wall, there is time to translate):
Http://tools.android.com/tech-docs/new-build-system/user-guide
http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0
Androidstudio Gradle DSL Method not found