googlearchive / android-instant-apps

Migrated:
https://github.com/android/app-bundle
Apache License 2.0
846 stars 277 forks source link

Flavors example not working on 3.0 Canary 5 #17

Closed LuigiPapino closed 7 years ago

LuigiPapino commented 7 years ago

If I import the flavors project in Android Studio 3.0 Canary 5, I see this in the Build Variants panel: selection_023

Trying to change for example the base module to freeDebug the selection is back to paidDebug and I see this warning: selection_024

Warning:Module 'base' has variant 'freeRelease' selected, but the modules ['bye', 'hello'] depend on variant 'paidDebug'
<a href="select.conflict.in.variants.window">Select 'base' in "Build Variants" window</a><br><a href="fix.conflict">Fix problem</a>

I do see in the list of Build Variants for the feature modules this extra varaints:

Is this expected? I can't figure out how to switch build variants and why they aren't aligned to the app module.

keyboardsurfer commented 7 years ago

This is a known issue. As a workaround, make sure that your feature module flavors match the actual package flavors. So having all set to "freeDebug" or "paidDebug" fixes the problem you're experiencing.

keyboardsurfer commented 7 years ago

The sample works well with Canary9. An update to the build files is incoming soon.