Recently, the company's project began using Google's official latest launch of Ide--android Studio 1.0, finding it easy to use Studio to play channel packs.
The following is an example of friend league statistics.
The first step, in the project's Androidmanifest file, was originally configured so
<meta-data android:name= "Umeng_channel" android:value= "Wandoujia"/>
now just set this value to a variable, as follows:
<meta-data android:name= "Umeng_channel" android:value= "${umeng_channel_value}"/>
The second step is to assign a value to the above variables under the Android node in the Build.gradle file of the main module in the project, as follows:
productflavors { Wandoujia { manifestplaceholders = [umeng_channel_value: ' Wandoujia '] } Anzhi { manifestplaceholders = [umeng_channel_value: "Anzhi"] } Anzhuo { manifestplaceholders = [umeng_channel_value: "Anzhuo"] } A360 { manifestplaceholders = [ Umeng_channel_value: "A360"] } }
then you can start to hit the channel, just the above configuration, you can hit multi-channel package at once.
Results:
Android Studio hits multi-channel pack