FCM插件缺少依赖性

时间:2016-10-28 13:25:18

标签: cordova ionic2 firebase-cloud-messaging

我正在使用Ionic 2.为了使用Googles推送通知服务,我需要安装this

ionic plugin add cordova-plugin-fcm

然而,在这样做之后,当我尝试构建应用程序时出现此错误:

Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
   Searched Location:
  E:\Development\IDE\ionic-apps\theWhoZoo\platforms\android\src\debug\google-services.json
  E:\Development\IDE\ionic-apps\theWhoZoo\platforms\android\google-services.json

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

所以我认为似乎缺少依赖google-services.json。我需要安装吗?怎么样?

如果有人可以提供帮助,我会很感激。

enter image description here

1 个答案:

答案 0 :(得分:0)

解决方案

我将google-services.json复制到\platforms\android