Suppose I have an Android app with three build types:
buildTypes {
release {
....
}
optRelease {
....
}
debug {
....
Thanks a lot ahasbini for your solution. Copying ahasbini's answer from this thread for easy reference to the solution.
You'll need to specify
matchingFallback
with the Android Gradle Plugin 3.0.0 for the plugin to know which fallback build type of library to use when being compiled with app code in case a certain build type defined in your app is not found in the library.buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { applicationIdSuffix '.debug' } staging { initWith release applicationIdSuffix '.staging' matchingFallbacks = ['release'] } }
More info here: Migrate to Android Plugin for Gradle 3.0.0.