使用环境:
Android studio 多渠道打包
使用方法:
1 APP下build.gradle文件
flavorDimensions "default"
productFlavors {
huawei {
dimension "default"
manifestPlaceholders = [ channel:"huawei" ]
}
xiaomi {
dimension "default"
manifestPlaceholders = [ channel:"xiaomi" ]
}
oppo {
dimension "default"
manifestPlaceholders = [ channel:"oppo" ]
}
vivo {
dimension "default"
manifestPlaceholders = [ channel:"vivo" ]
}
}
2 清单文件<application>
<application ……>
<meta-data android:name="UMENG_CHANNEL" android:value="${channel}"/>
</application>
正常apk打包流程即可,最后一步如图
选择要打的包等待即可。
感谢CityIndex
参考demo:GitHub - TUBB/CityIndex: Android快速索引和多渠道打包Demo