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,问题解决。

  • 相关阅读:
    高手 读书笔记-1.精英社会的神话
    企业IT架构转型之道 读书笔记-1.阿里巴巴集团中台战略引发的思考
    Redis学习-内存优化
    Redis学习笔记--常用命令
    Go语言备忘录(3):net/http包的使用模式和源码解析
    Go语言备忘录(2):反射的原理与使用详解
    Go语言备忘录(1):基本数据结构
    Go的接口总结
    Go的类型断言解析
    StrangeIoc框架学习
  • 原文地址:https://www.cnblogs.com/robinw666/p/11368545.html
Copyright © 2011-2022 走看看