微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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找到完整的说明.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐