【问题标题】:version conflict either by updating the version of the google-services plugin | Ionic版本冲突要么通过更新 google-services 插件的版本 |离子
【发布时间】:2018-11-23 20:05:10
【问题描述】:

FAILURE:构建失败并出现异常。

【问题讨论】:

标签: ionic-framework ionic2 gradle-plugin


【解决方案1】:

简单的解决方案是从我的 github 帐户安装这个更新的插件: 移除 fcm 插件:

ionic cordova plugin remove cordova-plugin-fcm-with-dependecy-updated

并安装此更新版本:

ionic cordova plugin add https://github.com/ishan123456789/cordova-plugin-fcm-with-dependecy-updated.git

如果上述方法不适合您。艰难的路

在某些渠道中看到的上述问题的解决方案是: 转到plugins/cordova-plugin-fcmplugins/cordova-plugin-fcm-with-dependency-updated 然后转到src/android/FCMPlugin.gradle

并替换:

    classpath 'com.google.gms:google-services:3.1.+'

    classpath 'com.google.gms:google-services:4.1.0'

核心:

    dependencies {
        compile 'com.google.firebase:firebase-core:11.8.0'
    }

还有plugin.xml

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

更换是根据谷歌服务更高版本进行的。就我而言,冲突与 google plus 插件有关,所以我去了plugins/cordova-plugin-googleplus,那里的 google 服务版本是

    <preference name="PLAY_SERVICES_VERSION" default="11.8.0"/>
    <framework src="com.google.android.gms:play-services-auth:$PLAY_SERVICES_VERSION" />
    <framework src="com.google.android.gms:play-services-identity:$PLAY_SERVICES_VERSION" />

所以11.8.0的版本从这里来了。

https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/283

https://github.com/fechanique/cordova-plugin-fcm/issues/231

Google Play Services GCM 10.0.1 asks to “update” back to 9.0.0

https://github.com/fechanique/cordova-plugin-fcm/issues/499

https://github.com/fechanique/cordova-plugin-fcm/issues/306

这个答案很足智多谋

com.google.android.gms:play-services-measurement-base is being requested by various other libraries

【讨论】:

    猜你喜欢
    • 2020-01-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-31
    • 1970-01-01
    相关资源
    最近更新 更多