Fix Gradle DSL method not found: ' Android () '

Source: Internet
Author: User
<span id="Label3"></p><p><p><strong>As the upgrade, the project will default to your Gradle version to replace the latest version, no backward compatibility, Runproguard () can not find<br></strong></p></p><p><p><strong>Put the Build.gradle in<br></strong></p></p><p><p></p></p>? <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter">123456</td> <td class="code"><code class="java plain">buildTypes {</code><code class="java spaces">        </code><code class="java plain">release {</code><code class="java spaces">            </code><code class="java plain">runProguard </code><code class="java keyword">false</code><code class="java spaces">            </code><code class="java plain">proguardFiles getDefaultProguardFile(</code><code class="java string">‘proguard-android.txt‘</code><code class="java plain">), </code><code class="java string">‘proguard-rules.pro‘</code><code class="java spaces">        </code><code class="java plain">}</code><code class="java spaces">    </code><code class="java plain">}</code></td> </tr> </tbody> </table><p><p>Replace With:</p></p><p><p></p></p>? <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td class="gutter">123456</td> <td class="code"><code class="java plain">buildTypes {</code><code class="java spaces">        </code><code class="java plain">release {</code><code class="java spaces">            </code><code class="java plain">minifyEnabled </code><code class="java keyword">false</code><code class="java spaces">            </code><code class="java plain">proguardFiles getDefaultProguardFile(</code><code class="java string">‘proguard-android.txt‘</code><code class="java plain">), </code><code class="java string">‘proguard-rules.pro‘</code><code class="java spaces">        </code><code class="java plain">}</code><code class="java spaces">    </code><code class="java plain">}</code></td> </tr> </tbody> </table><p><p>For more version questions, refer to:</p></p><p><p>Http://www.flakor.cn/2014-12-23-849.html?utm_source=tuicool</p></p><p><p></p></p><p><p>Upgrading Android Studio to a new version today, no surprises and problems</p></p><p><p>1,gradle DSL Method Not found: ' Runproguard () '</p></p><p><p>The Runproguard function has been deprecated and stopped using the<br>Change into minifyenabled<br>The configuration as follows</p></p> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>12345678</td> <td>Buildtypes {release {minifyenabled false//alternate Way ...}}</td> </tr> </tbody> </table><p><p>Runproguard-> minifyenabled<br>Jnidebuggbuild–> jnidebuggable<br>Zipalign–> zipalignenabled</p></p><p><p>2,library projects Cannot set ApplicationID</p></p><p><p>The new version cannot use ApplicationID to define the package name of the library module, as defined in the manifest</p></p> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>1234567</td> <td>Defaultconfig {applicationid "cn.flakor.lib" <----delete This line minsdkversion targetsdkversion 19 Versioncode 1 Versionname "1.0"}</td> </tr> </tbody> </table> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>1234</td> <td><manifest xmlns:android= "http://schemas.android.com/apk/res/android" xmlns:tools= "http://schemas.android.com/ Tools "package=" Cn.flakor.lib "...</td> </tr> </tbody> </table><p><p>Rename package names with flavor</p></p> <table border="0" cellspacing="0" cellpadding="0"> <tbody> <tr> <td>1234567</td> <td>Android {... productflavors {flavor1 {applicationid ' Cn.flakor.newname '}}</td> </tr> </tbody> </table><p><p>Reference (not FQ can not see, there is time to translate):</p></p><p><p>Http://tools.android.com/tech-docs/new-build-system/user-guide</p></p><p><p>http://tools.android.com/tech-docs/new-build-system/migrating-to-1-0-0</p></p><p><p>Fix Gradle DSL method not found: ' Android () '</p></p></span>

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.