1.清单文件application标签内设置
<meta-data android:name="UMENG_CHANNEL" android:value="${UMENG_CHANNEL_VALUE}" />
2.build.gradle的android闭包中设置
1),配置签名
signingConfigs {
test {
keyAlias 'xc'
keyPassword 'hu37QN'
storeFile file('E:/gitXCF/xcf/apk_keys')
storePassword 'hu37QN'
}
}
2),配置多渠道别名,用于打包出来的apk包名
flavorDimensions "default"
productFlavors {
V410_11001 {
dimension "default"
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "11001"]
}
V410_12001{
dimension "default"
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "12001"]
}
V410_13001{
dimension "default"
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "13001"]
}
V410_14001 {
dimension "default"
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "14001"]
}
V410_15001 {
dimension "default"
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "15001"]
}
V410_19001 {
dimension "default"
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "19001"]
}
V410_11101 {
dimension "default"
manifestPlaceholders = [UMENG_CHANNEL_VALUE: "11101"]
}
}