【问题标题】:Google Services Version Conflict after adding FCM Plugin : ionic 3添加 FCM 插件后的 Google 服务版本冲突:离子 3
【发布时间】:2018-09-19 07:25:16
【问题描述】:

我尝试使用FCM插件,但我的想法都失败了:

案例 1:我使用 cordova-google-plus 插件添加了 cordova-plugin-fcm-with-dependecy-updated 导致 Cordova 构建失败:

案例 2:我在 fcmplugin.gradle 文件中注释了以下几行

classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:4.1.0'   
apply plugin: 'com.google.gms.googleservices.GoogleServicesPlugin'

然后我在项目 build.gradle 中添加了以下几行

classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:4.1.0'
apply plugin: 'com.google.gms.google-services' at the bottom of build.gradle

Cordova 构建成功,但应用程序未在设备/模拟器上运行(“应用程序已停止”)。

我的应用中使用的插件:

【问题讨论】:

  • 欢迎来到 Stack Overflow!其他用户将您的问题标记为低质量和需要改进。我重新措辞/格式化您的输入,使其更容易阅读/理解。请查看我的更改以确保它们反映您的意图。如果您对我有其他问题或反馈,请随时给我留言。
  • 但请阅读no pictures of exceptions / no pictures of code。然后使用edit 链接在您的问题中用格式正确/缩进的文本替换文本的屏幕截图。

标签: cordova firebase ionic-framework ionic3 google-play-services


【解决方案1】:

请移除移除安卓平台 在 FCMPlugin.gradle(插件文件夹)上编辑如下:

classpath 'com.google.gms:google-services:4.1.0'
compile 'com.google.firebase:firebase-core:11.0.4'

然后在 plugin.xml 文件上

<framework src="com.google.firebase:firebase-core:11.0.4" />
<framework src="com.google.firebase:firebase-messaging:11.0.4" />

【讨论】:

    猜你喜欢
    • 2021-05-02
    • 1970-01-01
    • 2020-01-25
    • 1970-01-01
    • 1970-01-01
    • 2017-11-06
    • 2018-12-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多