zoukankan      html  css  js  c++  java
  • ionic项目使用Google FCM插件和Google maps插件打包android报错冲突问题

        这段时间在调FCM推送服务的插件 ,原本以为去年调通过,应该很容易,没想到还是出问题了。现将问题及解决方法整理如下,仅供参考:

        先看打包报错截图:        

        详细报错信息:Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-                            tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.+.

        大概的意思就是说:我使用的google-services插件与google gms服务的版本冲突,需要升级以解决冲突;

        出现这个问题的原因在于:我的项目中使用cordova-plugin-geolocation(定位)和cordova-plugin-googlemaps(地图),这两个插件使用了google-services服务,而ionic官方推荐添加的ionic cordova plugin add            cordova-plugin-fcm-with-dependecy-updated与fcm相关的插件使用了google的gms服务,这两个服务在一起的时候,必须保证服务相关的包的兼容性;

        解决方案:1.在android/app/build.gradle中修改dependencies下

             implementation 'com.google.firebase:firebase-core:16.0.8'
             implementation 'com.google.firebase:firebase-messaging:17.5.0'

                          2.在android/cordova-plugin-fcm-with-dependecy-updated/Alpha-FCMPlugin.gradle中修改 dependencies下

              compile 'com.google.firebase:firebase-core:16.0.8'
    

                    3.sync成功之后,build,问题解决。

  • 相关阅读:
    CF1051D Bicolorings dp
    loj2480 [CEOI2017]One-Way Streets 边双+树上差分
    有趣的支配树
    AtCoder Regular Contest 81
    [BZOJ5305][HAOI2018]苹果树(DP)
    [BZOJ4699]树上的最短路(最短路+线段树)
    [BZOJ3507][CQOI2014]通配符匹配(DP+Hash)
    [Luogu4724][模板]三维凸包(增量构造法)
    [BZOJ5317][JSOI2018]部落战争(闵可夫斯基和)
    [WC2014]时空穿梭(莫比乌斯反演)
  • 原文地址:https://www.cnblogs.com/robinw666/p/11368545.html
Copyright © 2011-2022 走看看