檢查項(xiàng)目和讀取基本配置
Gradle Build
gradle編譯的形式和你的配置有關(guān):
buildTypes {
release {
buildConfigField("boolean", "DEBUGABLE", "false")
buildConfigField("int", "SERVER_TYPE", "${rootProject.ext.serverEnvCode}")
minifyEnabled true
zipAlignEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
buildConfigField("boolean", "DEBUGABLE", "true")
buildConfigField("int", "SERVER_TYPE", "${rootProject.ext.serverEnvCode}")
versionNameSuffix "-debug"
minifyEnabled false
zipAlignEnabled true
shrinkResources false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
上面配置了release和debug形式的編譯,按鈕點(diǎn)擊后的最終執(zhí)行的是debug還是release在Android Studio左下角的Build Variants中:
一般執(zhí)行運(yùn)行安裝默認(rèn)為debug。