Reputation: 1751
I am obtaining that BuildConfig.BUILD_TYPE returns always "release", even if I am compiling it in debug mode.
I include here a part of my build.gradle:
buildTypes {
debug {
debuggable true
minifyEnabled false
}
release {
debuggable false
minifyEnabled false
//md5 sign certificate split in two
proguardFile './dexguard-config/dexguard-release-conservative.pro'
//proguardFile getDefaultDexGuardFile('dexguard-release-aggressive.pro')
proguardFile 'dexguard-project.txt'
}
Thank you!
Upvotes: 4
Views: 1556
Reputation: 985
Correct Answer:
Make sure you are importing BuildConfig
of your own module, with the package name from its AndroidManifest.xml
.
Other modules' BuildConfig
s might be hardwired to release.
Credits: https://stackoverflow.com/a/54639241/4922328
Old Answer:
Check your option in Build Variants in Android Studio.
Upvotes: -2
Reputation: 152847
Make sure you are importing BuildConfig
of your own module, with the package name from its AndroidManifest.xml
.
Other modules' BuildConfig
s might be hardwired to release
.
Upvotes: 9