BuildConfig位置
在AS切换到Project下app/buildgenerated/source/buildConfig文件夹下
新增自定义字段
buildTypes {
release {
BuildConfig.LOG_DEBUG
buildConfigField "boolean", "LOG_DEBUG", "false"
minifyEnabled true
zipAlignEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
buildConfigField "boolean", "LOG_DEBUG", "true"
minifyEnabled false
zipAlignEnabled false
shrinkResources false
signingConfig signingConfigs.debug
}
}