推送通知 - Firebase Control Messaging (FCM) - 无法 运行 应用程序(默认 Activity 未找到)

Push notification - Firebase Control Messaging (FCM) - could not run the app (Default Activity not found)

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

我什么都按照Google tutorial

添加到项目 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'
    }
}

添加到 应用程序 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'

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

Default Activity not found

screenshot

在从 gradle 中删除 firebase 依赖项的情况下,一切正常,应用 运行 正确。 当然,我已经更新了所有内容(SDK,gradle 版本等)

我正在开发即时应用程序,因此该项目是经过调制的(应用程序、即时应用程序、基础、功能等)。

有人知道为什么会这样吗?

尚不支持 Firebase 云消息传递 - reference document

未找到默认 Activity,对于他们的情况,是因为“app”配置启动选项设置为默认 Activity - 它应该是设置为 URL 否则,默认 Activity 选项需要在“app”模块的清单中包含

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

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