Xcode 中缺少所需的架构 arm64

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21933474/
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-09-15 04:40:52  来源:igfitidea点击:

Missing required architecture arm64 in Xcode

iosxcodearm64

提问by Tiddly

I'm getting the error "missing required architecture arm64 in file /user/location/myframework.a(2 slices)" when I compile my project to the iPad mini, it refers to a specific third party framework that I'm using. This error does not show up for any of the older arm7 devices.

当我将我的项目编译到 iPad mini 时,我收到错误“文件 /user/location/myframework.a(2 slices) 中缺少所需的架构 arm64”,它指的是我正在使用的特定第三方框架。任何较旧的 arm7 设备都不会出现此错误。

I know that this framework should be compiled to support the arm64 framework so to debug I created a second project that was completely blank except for this framework and it compiles just fine for the iPad mini. I used some of the functionality of the framework just to be sure it was actually being used by the project and it worked just fine.

我知道应该编译这个框架来支持 arm64 框架,所以为了调试我创建了第二个项目,除了这个框架之外完全是空白的,它对 iPad mini 编译得很好。我使用了框架的一些功能,只是为了确保项目确实在使用它并且它工作得很好。

So I'm 100% sure the issue isn't with the framework but with my project settings or something. I figured it might be that the old framework was still being cached somewhere so I cleaned and rebuilt, I deleted derived data, I removed the framework completely rebuilt and then added it back in. Nothing made a difference, it still comes up with the error "missing required architecture arm64 in file /user/location/myframework.a(2 slices)"

所以我 100% 确定问题不在于框架,而在于我的项目设置或其他东西。我想可能是旧框架仍在某处缓存,所以我清理并重建,删除派生数据,删除完全重建的框架,然后重新添加。没有任何区别,它仍然出现错误“文件 /user/location/myframework.a(2 片)中缺少所需的架构 arm64”

What might possibly be causing this problem?

什么可能导致这个问题?

EDIT: I should have mentioned that the project installs fine on the iPad mini when the above framework is not included in the project. arm64 is listed as a valid architecture in the project settings.

编辑:我应该提到当上述框架未包含在项目中时,该项目可以在 iPad mini 上正常安装。arm64 在项目设置中被列为有效架构。

回答by codercat

if not include 64 bit please include 64 bit

如果不包括 64 位请包括 64 位

enter image description here

在此处输入图片说明

回答by Chilton Webb

According to lipo -info, the included SDK only has i386 and x86_64 architectures.

根据 lipo -info,包含的 SDK 只有 i386 和 x86_64 架构。