FirebaseApp initialization unsuccessful in Android Instant apps

前端 未结 1 2052
再見小時候
再見小時候 2020-12-10 06:44

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 :

相关标签:
1条回答
  • 2020-12-10 07:39

    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.

    0 讨论(0)
提交回复
热议问题