I am currently working on an exiting Android application in order to create an Instant apps version.
My Android Studio is now split into several modules :
because according to the documentation the base library cannot have the same package name as the installed android app.
I think the documentation is a bit out of date. Each "feature" module needs to use a different package name, because that's what's used to generate the name of the R class. AFAIK there's no reason why you can't have the "base" feature use the same package name as the app itself.
It seems like the "google-services
" plugin needs to be updated for the "feature" plugin to use the application ID rather than the name specified in AndroidManifest.xml
(which will be overwritten later to be the same as the application ID).
tl;dr---changing the package name of "base" to "com.mycompany.myapp" should get things working.