ios Xcode 5.1:缺少所需的架构 arm64

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22331908/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:41:59  来源:igfitidea点击:

Xcode 5.1: missing required architecture arm64

iosxcodexcode5.1

提问by Brad Thomas

Just upgraded to Xcode 5.1, getting the following error:

刚刚升级到Xcode 5.1,出现以下错误:

ignoring file ...Dependencies/SalesforceNetworkSDK/libSalesforceNetworkSDK.a, missing required architecture arm64 in file ...Dependencies/SalesforceNetworkSDK/libSalesforceNetworkSDK.a (3 slices)

忽略文件 ...Dependencies/SalesforceNetworkSDK/libSalesforceNetworkSDK.a,缺少文件 ...Dependencies/SalesforceNetworkSDK/libSalesforceNetworkSDK.a 中所需的架构 arm64(3 个切片)

If I turn off build active archs only and remove arm64 from valid archs I get:

如果我关闭仅构建活动拱门并从有效拱门中删除 arm64,我会得到:

Build/Products/Debug-iphoneos/libPods.a, file was built for archive which is not the architecture being linked (armv7)

Build/Products/Debug-iphoneos/libPods.a,文件是为归档而构建的,这不是被链接的架构(armv7)

回答by Mani

According to apple's release note, see the following note point.

根据苹果的发布说明,请参阅以下注意点。

Note:

笔记:

Be aware of the following architectures issues when opening your existing projects in Xcode 5.1:

在 Xcode 5.1 中打开现有项目时,请注意以下架构问题:

  • When building for all architectures, remove any explicit architectures setting and use the default Standard Architectures setting. For projects that were previously opted-in using “Standard Architectures Including 64-Bit”, switch back to the “Standard architectures” setting.
  • When opening an existing project for the first time, Xcode 5.1 may display a warning about the use of the Xcode 5.0 architectures setting. Selecting the warning provides a workflow to revise the setting.
  • Projects not able to support 64-bit need to specifically set the architectures build setting to not include 64-bit.
  • 在为所有架构构建时,删除任何显式架构设置并使用默认的标准架构设置。对于之前选择使用“包括 64 位在内的标准架构”的项目,请切换回“标准架构”设置。
  • 首次打开现有项目时,Xcode 5.1 可能会显示有关使用 Xcode 5.0 架构设置的警告。选择警告提供了修改设置的工作流程。
  • 无法支持 64 位的项目需要专门将架构构建设置设置为不包括 64 位。

So you've to set architecture as below to support libs architecture.

因此,您必须将架构设置为如下以支持 libs 架构。

enter image description here

在此处输入图片说明

Reference from this post.

来自这篇文章的参考。

Update:From May 15,you've to take build from 5.1.1, see this post.

更新:5 月 15 日起,您必须从 5.1.1 开始构建,请参阅此帖子

回答by Vaibhav Saran

Don't know previous iOS but Setting Build Active ArchitectureOnly to YESin iOS 8did the trick.

不知道以前的 iOS,但在iOS 8中将Build Active ArchitectureOnly设置为有效YES

enter image description here

在此处输入图片说明

回答by Brad Thomas

I ended up getting my project to build by (1) turning off build active archs only (2) removing arm64 from valid archs and (3) making sure that the Pods project was building for only armv7 and armv7s.

我最终通过(1)关闭仅构建活动拱门(2)从有效拱门中删除 arm64 和(3)确保 Pods 项目仅针对 armv7 和 armv7s 构建项目来构建我的项目。

Also worth noting here, that at the time of writing this edit, Salesforce mobile SDK was not available for arm64

另外值得注意的是,在撰写此编辑时,Salesforce 移动 SDK 不适用于 arm64

回答by arunit21

I just changed the Debug from Yes to No,

我刚刚将调试从是更改为否,

Build Settings -> Architectures -> Build Active Architecture Only -> Debug -> NO.

This one fixed my error.enter image description here

这个修复了我的错误。在此处输入图片说明