Androidstudio Gradle DSL Method not found

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.