Firebase云消息传递不适用于Android上的Build变体

我在Firebase中有2个项目:nl.companyname和nl.companyname.acc:

这是我的build.gradle:

flavorDimensions "type"
productFlavors {
    acceptance {
        dimension="type"
        applicationIdSuffix ".acc"
        versionNameSuffix "-acc"
    }
    production {
        dimension="type"
        applicationIdSuffix ""
        versionNameSuffix ""
    }
}

下载google-services.json在目录中:
应用程序/谷歌-services.json

Android Studio登录Google帐户并已同步:

消息显示为已成功发送:

问题描述:

>在nl.companyname上发送消息时,它可以正常工作.
>发送邮件并定位设备的令牌ID时,它可以正常工作.
>但是nl.companyname.acc不起作用.

试过的步骤:

>我删除了Firebase中的.acc应用程序并重新添加(并下载了新的json文件).

任何帮助是极大的赞赏.

解决方法

Firebase Document中,它支持多种基于味道的项目.

You can have multiple google-services.json files for different build
variants) by placing google-services.json files in dedicated
directories named for each variant under the app module root. For
example,if you have “development” and “release” build flavors,your
configuration Could be organized like this:

app/
    google-services.json
    src/development/google-services.json
    src/release/google-services.json
    ...

您可以在here找到完整的说明.

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...