Android uses Gradle to release multi-channel versions.

Source: Internet
Author: User
Tags android sdk manager

Android uses Gradle to release multi-channel versions.

Today, when I published a multi-channel version through Gradle, I encountered the problem that the Gradle version was too low, and the manifestPlaceholders field was not supported. I tried every means to upgrade the plug-ins of Gradle and Gradle, and finally succeeded, here we will share the method with you.

I am using Intellij IDEA 13, Gradle version 1.8, and Gradle plug-in version 0.6. +. You need to upgrade Gradle to 2.1, and plug-in version to 0.14 +. The error is:

Deprecated dynamic property: "manifestPlaceholders" on "ProductFlavorDsl_Decorated{name=main, minSdkVersion=14, targetSdkVersion=19, renderscriptTargetApi=-1, versionCode=-1, versionName=null, packageName=null, testPackageName=null, testInstrumentationRunner=null, signingConfig=null}", value: "{CHANNEL_NAME=default_...".

First Change the distributionUrl in the/gradle/wrapper/gradle-wrapper.properties file under the project directory to (Note that there will also be a/gradle/wrapper/gradle-wrapper.properties file under the sub-project directory, which can be modified together ):

distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-bin.zip

Next, go to the project directory on the terminal and run the command to update Gradle:

./gradlew wrapper

After the update, modify the version of the gradle plug-in the build. gradle file:

dependencies {        classpath 'com.android.tools.build:gradle:0.14+'    }

Then run the command to update the plug-in the terminal project directory:

./gradlew assembleDebug

Errors may occur during the process:

The SDK Build Tools revision (17.0.0) is too low for project ':xdp_android'. Minimum required is 19.1.0

Download and install the SDK Build Tools 19.1.0 in Android SDK Manager. After the installation is complete, execute assembleDebug again.


If you feel helpful to yourself, I hope you can help me with it. Thank you :)
Blog: http://blog.csdn.net/zhaoxy2850
Address: http://blog.csdn.net/zhaoxy_thu/article/details/43990627
Please indicate the source for reprinting. Thank you!

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.