无法使用 Xcode 4.2 构建到 4.2.1 设备 [英] Cannot build to 4.2.1 device with Xcode 4.2
问题描述
我最近将我的项目从 Xcode 4.0.1 升级到 Xcode 4.2 - 一切都很顺利,我在模拟器中进行了一些调试,然后我决定使用设备进行构建.
I recently upgraded my project from Xcode 4.0.1 to Xcode 4.2 - and everything went pretty smoothly, I did some debugging in the simulator and then I decided to build with device.
我的设备是运行 4.2.1 的第二代 iPod Touch,所以我最初尝试构建它并收到此错误:
My device is a 2nd gen iPod Touch running 4.2.1, so I initially attempted to build to it and got this error:
收到来自设备的未知错误消息IncorrectArchitecture".
An unknown error message 'IncorrectArchitecture', was received from the device.
正如您对大多数错误消息所做的那样,我用谷歌搜索了它,发现了这个问题.
As you do with most error messages, I googled it, and found this question.
阅读答案后,我继续检查我的目标架构,结果我只有 armv7
作为要构建的架构.- 正如答案所暗示的那样,我添加了 armv6
架构,但是当我构建它时,我收到了大量构建警告/错误,例如:
After reading the answer, I proceeded to check up on my target architectures, and it turns out I only had armv7
as an architecture to build for. - I added the armv6
architecture, as the answer suggests, but when I built it, I got a load of build warnings/errors such as:
忽略文件/some/path/to/a/staticlibrary.a,文件是为归档而构建的,这不是被链接的架构 (armv6)
ignoring file /some/path/to/a/staticlibrary.a, file was built for archive which is not the architecture being linked (armv6)
这发生在我项目中的所有静态库上,例如 kal 库 - libkal.a 和所有 Three20 库.
This occurs on all the static libraries in my project, such as the kal library - libkal.a and all the three20 libraries.
那些库在 Xcode 4.0.2 中链接良好 - 并且它也可以很好地构建到我的 iPod - 那么为什么 armv7
架构不会构建并且库没有链接到 armv6
在 Xcode 4.2 中?- 我真的很困惑 - 任何建议将不胜感激.
Those libraries linked fine in Xcode 4.0.2 - and it also built fine to my iPod - so why will the armv7
architecture not build AND the libraries not link for armv6
in Xcode 4.2? - I'm really confused - any suggestions would be greatly appreciated.
推荐答案
将 ARMV6 添加到您的构建设置中,如下所示:
Add ARMV6 to your build settings like this:
- 选择您的构建设置
- 滚动到架构
- 双击现有条目
- 点按 +
- 输入armv6
- 点按完成
您需要对与您的应用相关联的所有项目(例如three20)执行此操作.
You will need to do this for all projects that are linked with your app (e.g. three20).
这篇关于无法使用 Xcode 4.2 构建到 4.2.1 设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!