11

I have a device that was designed in cordova 1.8.1 and xcode 4.4. I wanted to be able to update it to work on the iPhone 5 and ios 6.However even when I try to just run the app for debugging in xocde 4.5 I receive this error:

file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/Shared/Cordova/Frameworks/Cordova.Framework/Cordova for architecture armv7s. 

I have googled it, and tried to set the project to target arm7vs but it doesn't work. Can anyone tell me what causes this error?

Do i need to update my version of Cordova/PhoneGap?

4

1 回答 1

41

iPhone 5 的 SoC 采用了全新架构:armv7s。当您切换到 Xcode 4.5 时,您的项目的“有效架构”设置可能已更新为包括 armv7s。问题是您的库似乎还不支持它(它们不是为 armv7s 构建的)。

您可以通过三个选项来解决此问题:

  • 从项目(目标)“构建设置”/“有效架构”中删除 armv7s: 在此处输入图像描述

  • 将“仅构建活动架构”设置为 YES:
    在此处输入图像描述

  • 更新静态库(如果它们有支持 armv7s 的更新版本)

编辑:对于那些找不到“仅构建活动架构”选项的人,请确保“构建设置”下的“全部”过滤器按钮处于活动状态:

在此处输入图像描述

于 2012-10-02T09:44:28.813 回答