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!