推送通知 - firebase控制消息(FCM) - 无法运行该应用程序(找不到默认活动)



我尝试将FCM添加到我的应用中,以发送推送通知。但是我有一个问题。

我根据Google教程做所有事情

添加到项目 build.gradle:

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0-alpha05'
        classpath 'com.google.gms:google-services:3.1.1'
    }
}

添加到 app build.gradle

dependencies {
    ...
    compile 'com.google.firebase:firebase-core:11.8.0'
    compile 'com.google.firebase:firebase-messaging:11.8.0'
}
apply plugin: 'com.google.gms.google-services'

,但是添加

之后
    compile 'com.google.firebase:firebase-core:11.8.0'
    compile 'com.google.firebase:firebase-messaging:11.8.0'

和同步项目,我收到了构建错误 -

找不到默认活动

屏幕截图

如果从gradle中删除了firebase依赖性,则一切正常,应用程序正常运行。当然,我已经更新了所有内容(SDK,Gradle版本等)

我正在开发Instant App,以便调制(应用程序,InstantApp,base,功能等)中的项目。

有人知道为什么会发生这种情况吗?

尚未支持firebase云消息传递 - 参考文档

对于他们的情况,找不到默认活动是因为' app '配置启动选项设置为默认活动 - 应将其设置为URL否则,默认活动选项需要在" app "模块的清单中使用

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

最新更新