按照教程配置 productFlavors
每次打出来的包都是 debug 包
配置如下
defaultConfig {
applicationId "com.sxc.captain"
minSdkVersion 16
targetSdkVersion 22
versionCode 9
versionName "1.5.1"
ndk {}
manifestPlaceholders = [
----
]
multiDexEnabled true
flavorDimensions "versionCode"
}
productFlavors {
beta {//测试环境
applicationId "com.sxc.captain.beta"
applicationIdSuffix ".beta"
manifestPlaceholders = [
app_name: "@string/app_name_beta",
]
}
product {//生产环境
applicationId "com.sxc.captain.product"
applicationIdSuffix ".product"
manifestPlaceholders = [
app_name: "@string/app_name",
]
}
}
这个是路径
这个是包名
You need this
Answer from https://stackoverflow.com/a/2...