如果您希望添加或更改特定设置,您可以将调试构建类型添加到您的配置中。以下示例为调试构建类型指定了 applicationIdSuffix,并配置了一个使用调试构建类型中的设置进行初始化的jnideb
《Android学习笔记总结+最新移动架构视频+大厂安卓面试真题+项目实战源码讲义》
【docs.qq.com/doc/DSkNLaERkbnFoS0ZF】 完整内容开源分享
ug构建类型。
applicationIdSuffix: 字段表示,在不改变你默认的程序ID(包名)的情况下,为其添加后缀。比如你的包名是com.rae.app,但你想区分测试包和正式包的情况,这个时候将applicationIdSuffix设置为.debug,那么你的应用程序对应的包名就变成了com.rae.app.debug
android {
…
defaultConfig {…}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
}
debug {
applicationIdSuffix “.debug”
}
/**
- The ‘initWith’ property allows you to copy configurations from other build types,
- so you don’t have to configure one from the beginning. You