Flutter iOS友盟库冲突UMCAnalytics6.1.0,UMCCommon7.1.1解决方案

flutter 版本 1.7.1 接收新项目的时候pod install 后 提示以下错误



/Users/xxx/workspace-flutter/xx_flutter/ios/Pods/UMCAnalytics/UMAnalytics.framework/UMAnalytics(UMComCheckEvent.o)

/Users/xxx/workspace-flutter/xx_flutter/ios/Pods/UMCCommon/UMCommon.framework/UMCommon(UMComCheckEvent.o)

ld: 164 duplicate symbols for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

note: Using new build system

note: Building targets in parallel

note: Planning build

note: Constructing build description



然后查了一堆资料 只有提示 

UMCAnalytics-6.1.0   UMCCommon-7.1.1 两个库有冲突,只能保留一个

冲突内容大致是UMCAnalytics、UMCCommon里有重复定义的类、属性

可是我的flutter 必须要用到这2个库 所以我就找了2天找到一篇文章

https://github.com/zileyuan/umeng_analytics_push/issues/5

最终解决方式就是

打开 Podfile.lock

把 UMCAnalytics  UMCCommon版本分别

  - UMCAnalytics (6.1.0):

    - UMCCommon

  - UMCCommon (7.1.1)

  - UMCCommonLog (2.0.0)

替换为 

UMCAnalytics (6.0.5):

UMCCommon

UMCCommon (2.1.1)

UMCCommonLog (1.0.0)

亲测可行,如果没有看到Podfile.lock文件 就先用VS 或者Android Studio

Futter run 一下,让它自动pod install一下就会出现这个文件了

希望帮到还在路上的你

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容