【问题标题】:Ionic google services not found找不到离子谷歌服务
【发布时间】:2020-02-20 01:26:21
【问题描述】:

我创建了一个使用 google maps API 及其开发工具的 ionic 4 项目。我现在想为 android 版本构建 peoject 我运行了命令

ionic cordova build --release android

然后我收到以下错误消息

* What went wrong:
 Execution failed for task ':app:processReleaseGoogleServices'.
 > File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:   

我已经从 firebase 下载了 google-services.Json,但我不确定我应该把它放在哪里以及我需要编辑哪些文件。如果你想要某个文件的内容,请告诉我,我把它放在这里。感谢您的帮助

【问题讨论】:

  • 您使用哪个插件来推送通知?如果您使用FCM 插件,请将此文件放在根目录中。如果您使用的是phonegap-push-plugin,请将其放在您的platform/app/src/debug 文件夹中。如果调试文件夹不存在,则制作一个。

标签: google-maps ionic-framework


【解决方案1】:

尝试将此文件复制到:\platforms\android

当某些版本的 Android Studio 上的此文件损坏等时,存在一个已知问题。因此,如果您再次看到此文件,请仔细检查该文件是否始终存在。

如果您从未使用过 Android Studio 版本:

google-services.json 需要在 app/google-services.json 中。那么你的 config.xml 需要有:

<resource-file src="google-services.json" target="app/google-services.json" />

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-09-30
    • 1970-01-01
    • 1970-01-01
    • 2017-04-17
    • 1970-01-01
    • 2018-04-27
    • 1970-01-01
    相关资源
    最近更新 更多