将Google AnalyticsSDK(GoogleAnalyticsiOS_2.0beta4)集成到我的iOS应用中时出错 [英] Error while integrating Google Analytics SDK (GoogleAnalyticsiOS_2.0beta4) in my iOS app

查看:70
本文介绍了将Google AnalyticsSDK(GoogleAnalyticsiOS_2.0beta4)集成到我的iOS应用中时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误:


重复符号_OBJC_METACLASS _ $ _ GAIDispatcher in:

/ Shared / ThirdParty / Analytics /libGoogleAnalytics.a(GAIDispatcher.o)

/Shared/ThirdParty/Analytics/libGoogleAnalytics_debug.a(GAIDispatcher.o)
ld:212架构armv7 clang的重复符号:错误:
linker命令失败,退出代码1(使用-v查看调用)

我在应用程序中使用coredata,并且已链接文档中提到的所有框架。
另外,我正在使用Xcode 4.5.2编译我的应用程序。



可能的重复Q可能是( Google AnalyticsSDK for iOS不是为armv7s架构而构建的,而在iPhone上安装应用程序)。
但是,我没有使用Analytic v1.5.1。我使用的是版本2(测试版)。

解决方案

您遇到的问题是因为您有 两个 Google Analytics库包含在您的构建产品中。非调试版本和调试版本。

您需要解决并简单地使用其中之一。取出未使用的项目,或取消选中文件检查器中目标的成员资格复选框,以查找不需要的库。



我说的复选框是见下面。而不是UIKit.framework(我很快选择了这个例子),找到两个Google Analytics库中的一个并将其关闭。




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).

解决方案

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.

这篇关于将Google AnalyticsSDK(GoogleAnalyticsiOS_2.0beta4)集成到我的iOS应用中时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆