Android Instant App:找不到默认活动
这似乎是清单合并错误.我正在尝试将现有代码移植到即时应用程序模块中.我尝试过的是:
This seems to be manifest merging error. I'm trying to port existing code to instant app module. What I've tried is :
- 已将主应用程序模块更改为baseFeatureModule.
- 创建了一个新的模块completeApp.
-
清空了completeAppModule的清单:
- Changed main app module to baseFeatureModule.
- Created a new module completeApp.
Emptied completeAppModule's Manifest :
在completeAppModule中添加了实施项目条目
added implementation project entry in completeAppModule
实施项目(:udofy")
implementation project (":udofy")
在基本模块中添加了这些条目:
Added these entries in base module :
baseFeature在android块中为真
baseFeature true in android block
依赖项中的应用程序项目(:fullModule")
application project (":fullModule") in dependencies
我尝试重建/使缓存无效并重新启动/重新启动Studio,但没有帮助.有人可以帮我吗?
I've tried rebuilding/ invalidate cache and restart/ Restarting studio but no help. Can anybody help me out here?
我发现,清单合并由于在基本模块中的Firebase插件而失败.
I figured out, that the Manifest merger failed with the Firebase plugin in the base module.
选项1:
我通过在基本模块"AndroidManifest.xml"中添加以下内容来解决此问题.
I fixed this by adding following to the base modules 'AndroidManifest.xml'.
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="mypackage.firebaseinitprovider"
android:exported="false"
tools:node="merge"/>
别忘了替换 mypackage
.
选项2:
将整个< application ...> ...</application>
标记复制到应用程序模块 AndroidManifest.xml
Copy the whole <application ...>...</application>
tag into app modules AndroidManifest.xml