Environment: Windows Android Studio 0.80
Gradle Plug-in
Gradle-v
------------------------------------------------------------
Gradle 1.10
------------------------------------------------------------
Build time:2013-12-17 09:28:15 UTC
Build Number:none
Revision:36ced393628875ff15575fa03d16c1349ffe8bb6
groovy:1.8.6
Ant:apache Ant (TM) version 1.9.2 compiled on July 8 2013
ivy:2.2.0
JVM:1.6.0_43 (Sun Microsystems Inc. 20.14-B01)
Os:windows 7 6.1 x86
------------------------------------------
Create a new Demo project
1.android mainifest.xml file in the application tag
<meta-data android:name= "Umeng_channel" android:value= "${umeng_channel_value}"/>
</application>
2. build.gradle files in the Project app directory
and apply plugin: ' Com.android.application ' peer
productflavors {
Sub-Package 1
Playstore {
Package Name Select Fill
Applicationid= ' Com.soualgou.killerrb.demo. ' +name
Meta data replaced by Name,name=playstore
Manifestplaceholders = [ umeng_channel_value: Name]
}
Sub-Package 2
hiapk {
Package Name Select Fill
Applicationid= ' Com.soualgou.killerrb.demo. ' +name
Meta data replaced by name,name=hiapk
Manifestplaceholders = [ umeng_channel_value: Name]
}
}
This makes it possible to make multi-channel packages.
I use this simple demo, packaging 30 channels. With time total time:6 mins 51.538 secs
Accessories: detailed Android Studio multi-channel packaging
Android Studio 0.80 multi-channel packaging