无法将GoogleAnalytics 3.01与XCode 5相关联(缺少必需的架构x86_64) [英] Unable to link GoogleAnalytics 3.01 with XCode 5 (missing required architecture x86_64)
问题描述
我已经建立了我的应用程式(指定iOS7),现在想要在提交前将Google Analytics(分析)套用为最后一个步骤。我做了什么:
- 已下载适用于iOS 3.01的GA
- 导入内容
/ GoogleAnalytics / Library /
加入群组GoogleAnalytics - 导入
libGoogleAnalyticsServices.a
加入群组GoogleAnalytics - 添加了构建阶段和交换生成阶段
libGoogleAnalytics_debug.a
libGoogleAnalyticsServices.a
- 添加了代码块
#includeGAI.h
到-Prefix.pch
-file。 - 初始化
[GAI sharedInstance]
在我的AppDelegate
。
我已附加设置的屏幕截图这个帖子的底部。
当我尝试生成(设备或模拟器,32位),我得到以下链接器错误:
架构x86_64的未定义符号:
_OBJC_CLASS _ $ _ GAI,引用自:
objc-class-ref in FTVAppDelegate.o
ld:没有为架构x86_64找到符号
clang:错误:链接器命令失败,退出代码1(使用-v查看调用)
我也得到警告
/ p>ld:warning:忽略文件... / libGoogleAnalyticsServices.a,在文件...中丢失所需的架构x86_64 ... / libGoogleAnalyticsServices.a (3 slices)
ld:warning:忽略文件... / SDWebImage.framework / SDWebImage,缺少必需的架构x86_64在文件... / SDWebImage.framework / SDWebImage(3切片)
UPDATE 2
当建64bit。我不小心将只为活动架构构建设置为NO,当此更改为YES时,我可以再次构建。这意味着应用程序现在不能在iPhone 5S上运行 - 这仍然是一个问题。
解决方案错误。我确定google还没有提供一个arm64版本的他们的libGoogleAnalyticsServices.a,这是真的很讨厌...从公开发布Xcode 5GM已经几个星期。
现在,我想只有构建armv7,armv7s或删除google分析,直到他们的头从他们的裤子。
UDATE:最后修正 https://developers.google.com/analytics/devguides/collection/ios/resources
I have built my App (targeted for iOS7) and now want to apply Google Analytics as the last step before submission. What I did:
- Downloaded GA for iOS 3.01
- Imported content of
/GoogleAnalytics/Library/
into group "GoogleAnalytics"- Imported
libGoogleAnalyticsServices.a
into group "GoogleAnalytics"- Added Build Phases and swapped build phase
libGoogleAnalytics_debug.a
withlibGoogleAnalyticsServices.a
- Added code block
#include "GAI.h"
to my-Prefix.pch
-file.- Initialize the
[GAI sharedInstance]
in myAppDelegate
.I have attached screenshots of the setup in the bottom of this post. When I try to build (either device or simulator, both 32bit), I get the following linker errors:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GAI", referenced from: objc-class-ref in FTVAppDelegate.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I solve this?
UPDATE 1
I also get the warning
ld: warning: ignoring file .../libGoogleAnalyticsServices.a, missing required architecture x86_64 in file .../libGoogleAnalyticsServices.a (3 slices) ld: warning: ignoring file .../SDWebImage.framework/SDWebImage, missing required architecture x86_64 in file .../SDWebImage.framework/SDWebImage (3 slices)
UPDATE 2
This error only occurs when building for 64bit. I had accidentally set "Build Only for active architectures" to NO, when this changed to YES, I was able to build yet again. This means that the App now does NOT work on iPhone 5S - which is still a problem.
解决方案You're not doing anything wrong. I'm pretty sure google has not yet provided a arm64 version of their libGoogleAnalyticsServices.a, which is really annoying ...it has been weeks since the public the release of Xcode 5GM.
For now, I guess only build for armv7, armv7s or remove google analytics until they get their head out of their pants.
UDATE: Finally fixed https://developers.google.com/analytics/devguides/collection/ios/resources
这篇关于无法将GoogleAnalytics 3.01与XCode 5相关联(缺少必需的架构x86_64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!