Error while integrating Google Analytics SDK (GoogleAnalyticsiOS_2.0beta4) in my iOS app

橙三吉。 提交于 2019-12-02 09:40:52

问题


I am getting following error

duplicate symbol _OBJC_METACLASS_$_GAIDispatcher in:
/Shared/ThirdParty/Analytics/libGoogleAnalytics.a(GAIDispatcher.o)
/Shared/ThirdParty/Analytics/libGoogleAnalytics_debug.a(GAIDispatcher.o) ld: 212 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using coredata in my app and I have linked all the frameworks as mentioned in the doc. Also, I am compiling my app using Xcode 4.5.2.

A possible duplicate Qs could be (The Google Analytics SDK for iOS isn't built for the armv7s architecture while instaling app on iPhone) . But, I am not using Analytic v1.5.1. I am using version 2(beta).


回答1:


The problem you're seeing is because you have two Google Analytics libraries being included in your built product. The non-Debug version and the Debug version.

You need to settle on and simply use one of them. Take the non-used one out of your project or uncheck the target's "membership" checkbox in the file inspector for that unwanted library.

The checkbox I'm talking about is seen below. Instead of "UIKit.framework" (which I quickly selected to make this example), look for one of the two Google Analytics libraries and turn it off.



来源:https://stackoverflow.com/questions/14544891/error-while-integrating-google-analytics-sdk-googleanalyticsios-2-0beta4-in-my

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