After I upgrade Android Studio to the latest release 3.6 I faced with the problem when I switch between variants during develop app (has dynamic feature).
My Settings flavors
for all modules (app/library/dynamic-feature):
flavorDimensions "default"
productFlavors {
dev {
isDefault.set(true)
dimension "default"
}
live {
dimension "default"
}
qa {
dimension "default"
}
}
Default variant (both AS3.6 and previous)
When I switched to qa
flavor on AS 3.5.x
When I do that on AS 3.6:
Then AS show message:
Module 'xxx' has variant 'qaDebug' selected, but the module 'dynamic-feature' depends on variant 'devDebug'
My configuration in module dynamic-feature
is depended on build variant. Now, it's always fallback to dev
.
Is there anyway to solve this problem?
Any suggestions are appreciated, thank you.
UPDATE This problem also happens on AS4.0
Wow, I need to manually change variant for dynamic-feature
module, then it's worked.
But any time I switch between variants, I will have to sync two times (one for first switching on app module, other for switching variant for dynamic-feature
because I only have one module dynamic-feature
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With