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