Android Studio:gradle DSL Method not found: ' Runproguard () '

Source: Internet
Author: User

Android Studio released a new version 1.0, after the update found that the original under 0.8 normal project compilation failed, from the error is stuck on the gradle above.

' Runproguard () '

Cannot find Runproguard () This method

The final reason is very people without words, the original Gradle engineer and Google is responsible for Android this piece is a urine sex!! No matter the development compatibility of the upper and lower versions!!

Android Studio 1.0 defaults to the new version of Gradle, and when upgraded, it automatically modifies the contents of the Build.gradle file under the project to:

' COM.ANDROID.TOOLS.BUILD:GRADLE:1.0.0-RC4 ' // Note:do not place your application dependencies here; they belong // In the individual module build.gradle files }


The Gradle version used before the upgrade should be 0.12.2, so this should be the case before:

' com.android.tools.build:gradle:0.12.2 ' // Note:do not place your application dependencies here; they belong // In the individual module build.gradle files }


If you have an older version of Gradle in your computer, changing the version number back can be as normal as the original, but this is obviously not the best approach.

The final solution to this problem is that in the new version of Gradle, the Runproguard () method has been deprecated and changed to a new method: minifyEnabled()。 Therefore, the correct workaround is not to modify the version number of the Gradle, Instead, change minifyEnabled(),即: the Runproguard method name in the Build.gradle file for each module in the project to

    buildtypes {        release {            false            proguardfiles getdefaultproguardfile ( ' Proguard-android.txt ' ' Proguard-rules.pro '         }    }

Android Studio:gradle DSL Method not found: ' Runproguard () '

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.