Xcode 12:在 FIRAnalyticsConnector 上构建错误 [英] Xcode 12: build Error on FIRAnalyticsConnector

查看:44
本文介绍了Xcode 12:在 FIRAnalyticsConnector 上构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到 Xcode 12 后,我的项目不再为模拟器构建.

After upgrading to Xcode 12, my project doesn't build for the simulator anymore.

我得到的错误是:

ld: in ... /Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(
FIRAnalyticsConnector_e321ed8e3db06efc9803f6c008e67a34.o), 
building for iOS Simulator, but linking in object file built for iOS, file
'.../Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector'
for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

一种解决方法是将 arm64 添加到我的项目中 >构建设置 >排除的架构,但它不会为我的真实设备构建.

A workaround is adding arm64 to my project > Build Settings > Excluded Architectures, but then it won't build for my real device.

我已经尝试过清理构建文件夹、更新 pod 文件、重新启动等

I already tried cleaning the build folder, updating pod file, restarting etc.

我正在使用:

  • Firebase/分析 (6.33.0)
  • Xcode 12.0.1 (12A7300)
  • CocoaPods:1.9.3

有什么想法吗?

推荐答案

好的,我终于找到了解决问题的方法.

Ok, I finally found a fix for the issue.

更改仅构建活动架构"对是"也用于发布".
可以找到该设置,选择您的项目 >构建设置">目标"(你的目标) >架构"

Change "Build Active Architecture Only" to "Yes" also for "Release".
The setting can be found selecting your project > "Build Settings" > "Targets" (your target) > "Architectures"

来源和更详细的解释可以在这里找到:
https://stackoverflow.com/a/64139830/4134160

Source and more elaborate explanation can be found here:
https://stackoverflow.com/a/64139830/4134160

请注意,该问题与 Firebase 无关.我仍然会保留它,因为它可能会导致其他人遇到此问题并帮助他们解决此问题.

Please note that the problem is not related to Firebase. I'll still leave it since it might lead others to this issue and help them to resolve this.

这篇关于Xcode 12:在 FIRAnalyticsConnector 上构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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