Android Instant App:找不到默认活动 [英] Android Instant App : Default Activity not found

查看:47
本文介绍了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 :

  1. 已将主应用程序模块更改为baseFeatureModule.
  2. 创建了一个新的模块completeApp.
  3. 清空了completeAppModule的清单:

  1. Changed main app module to baseFeatureModule.
  2. Created a new module completeApp.
  3. 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

这篇关于Android Instant App:找不到默认活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆