duplicate symbols for architecture x86_64 While adding pods from CocoaPods

房东的猫 提交于 2019-12-12 10:32:45

问题


I am trying to use Google Analytics into my App.

But immediately after adding it via CocoaPod i am getting this Error:

Previously I have GoogleMaps and GCM in my pod.

Now My Pod is look like this:

platform :ios, '8.0'

pod 'Google/Analytics'
pod 'Google/CloudMessaging'
pod 'GoogleMaps'

How Can I resolve this Error:

*EDIT

This solve my problem:

If I run my existing project X-Code 7 then I am not getting the Error.

But I want it to run in Xcode 6.4 so I added older version of GA and that works fine with X-Code 6.4.

I have added manually the older sdk but if any one wants to add it Via Cocoa-Pod then Here is the way of doing it:

  pod 'Google/Analytics'
  pod 'GoogleAnalytics', '3.13.0'

回答1:


Please remove "Other linker flag" which is set in build setting. If it is set to -ObjC then please remove it and try to build again.

hope this works




回答2:


This error often happens is accidentally importing the .m file instead of the .h



来源:https://stackoverflow.com/questions/34084718/duplicate-symbols-for-architecture-x86-64-while-adding-pods-from-cocoapods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!