签名文件配置
signingConfigs { origin { keyAlias 'flavors' keyPassword '123456' storeFile file('签名文件路径/aaa.jks') storePassword '123456' } }
在build.gradle文件里面配置多渠道打包,如果渠道不多直接写在productFlavors{} 里面就好了。这里只添加了2个渠道,通过配置manifestPlaceHolders,添加渠道信息
productFlavors { origin{ signingConfig signingConfigs.origin manifestPlaceholders = [CHANNEL_VALUE:"origin"] } huawei{ signingConfig signingConfigs.origin manifestPlaceholders = [CHANNEL_VALUE:"huawei"] } }
在AndroidManifest文件的aplication标签中添加
<meta-data android:name="channel" android:value="${CHANNEL_VALUE}" />
标签:origin,signingConfigs,app,productFlavors,添加,安卓,打包 From: https://www.cnblogs.com/zsdblog/p/17451197.html