If you add a new build type in app's build.gradle
.
android {
buildTypes {
debug {
ext.enableCrashlytics = false
manifestPlaceholders = [crashlyticsEnabled: false, analyticsEnabled: false]
signingConfig signingConfigs.config
}
release {
manifestPlaceholders = [crashlyticsEnabled: true, analyticsEnabled: true]
// shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
// NEW
debugRelease {
debuggable true
ext.enableCrashlytics = false
manifestPlaceholders = [crashlyticsEnabled: true, analyticsEnabled: true]
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
}
You need to add the new buildTypes into your library modules build.gradle
as well.
android {
buildTypes {
debugRelease {
initWith release
debuggable true
}
}
}
If your app includes a build type that a library dependency does not, you will bump into the following errors.
ERROR: Unable to resolve dependency for ':app@debugRelease/compileClasspath': Could not resolve project
.
References: