无法将 GoogleAnalytics 3.01 与 XCode 5 链接(缺少所需的架构 x86_64) [英] Unable to link GoogleAnalytics 3.01 with XCode 5 (missing required architecture x86_64)

查看:19
本文介绍了无法将 GoogleAnalytics 3.01 与 XCode 5 链接(缺少所需的架构 x86_64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了我的应用程序(针对 iOS7),现在想应用 Google Analytics 作为提交前的最后一步.我做了什么:

I have built my App (targeted for iOS7) and now want to apply Google Analytics as the last step before submission. What I did:

  1. 已下载适用于 iOS 3.01 的 GA
  2. /GoogleAnalytics/Library/ 的内容导入到GoogleAnalytics"组
  3. libGoogleAnalyticsServices.a 导入GoogleAnalytics"组
  4. 添加了构建阶段并将构建阶段libGoogleAnalytics_debug.alibGoogleAnalyticsServices.a
  5. 交换
  6. 在我的 -Prefix.pch 文件中添加了代码块 #include "GAI.h".
  7. 在我的 AppDelegate 中初始化 [GAI sharedInstance].
  1. Downloaded GA for iOS 3.01
  2. Imported content of /GoogleAnalytics/Library/ into group "GoogleAnalytics"
  3. Imported libGoogleAnalyticsServices.a into group "GoogleAnalytics"
  4. Added Build Phases and swapped build phase libGoogleAnalytics_debug.a with libGoogleAnalyticsServices.a
  5. Added code block #include "GAI.h" to my -Prefix.pch-file.
  6. Initialize the [GAI sharedInstance] in my AppDelegate.

我在这篇文章的底部附上了设置的屏幕截图.当我尝试构建(设备或模拟器,均为 32 位)时,出现以下链接器错误:

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?

更新 1

我也收到警告

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)

更新 2

此错误仅在为 64 位构建时发生.我不小心将仅针对活动架构构建"设置为 NO,当它更改为 YES 时,我能够再次构建.这意味着该应用程序现在无法在 iPhone 5S 上运行 - 这仍然是一个问题.

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.

推荐答案

你没有做错任何事.我很确定谷歌还没有提供他们的 libGoogleAnalyticsServices.a 的 arm64 版本,这真的很烦人......自从 Xcode 5GM 公开发布已经有几周了.

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.

就目前而言,我想只为 armv7、armv7s 构建或删除谷歌分析,直到他们从他们的裤子中脱身.

For now, I guess only build for armv7, armv7s or remove google analytics until they get their head out of their pants.

UDATE: 终于修复了 https://developers.google.com/分析/开发指南/收藏/ios/资源

这篇关于无法将 GoogleAnalytics 3.01 与 XCode 5 链接(缺少所需的架构 x86_64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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