BuildType针对Release模式,只需要删除signingConfig的引用
例如
buildTypes {
release {
debuggable false
jniDebuggable false
renderscriptDebuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// release模式注释signingConfig,
// 编译后在主模块/build/outputs/apk/release/目录下生成xxx-release-unsigned.apk文件
// if (project.hasProperty("RELEASE_STORE_FILE")) {
// signingConfig signingConfigs.release
// }
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=0'
}
}
}
debug {
// debug模式默认会使用android studio自带的debug签名文件
debuggable true
jniDebuggable true
renderscriptDebuggable true
externalNativeBuild {
ndkBuild {
arguments 'NDK_DEBUG=1'
}
}
}
}
网友评论