0

当我使用 iPhone 模拟器运行它以及在设备上运行它时,我的项目运行良好。当我尝试将其存档以供提交时,我收到此错误:

clang: error: linker command failed with exit code 1 (use -v to see invocation)

这直接发生在错误之前,我不确定它是否相关:

ld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Volumes/Macintosh HD/Users/dog94a/Google Drive/Capstone/Backups/Approach/Approach/GMaps/GoogleMaps.framework/GoogleMaps     for architecture armv7s
4

2 回答 2

1

The default behavior of the Debug build configuration is to only build the active architecture (Build Active Architecture Only build setting is YES). This is not the case for the Release build configuration, which will build all architectures supported by your Valid Architectures build setting. What this means is that you're likely not targeting an armv7s device during your Debug builds (iPhone 5, latest iPad, etc), so you're not attempting to build that architecture until you do an archive which uses the Release build configuration by default.

The error indicates that your project is configured to create a binary that has armv7s instructions for when it runs on devices of that type, but the GoogleMaps.framework binary you're trying to link against was not built with an armv7s slice. To fix this, you either have to update to the latest version of the GoogleMaps.framework and hope they built it with armv7s enabled, or remove armv7s from your Valid Architectures build setting (obviously the former is preferable).

于 2013-08-11T18:35:49.100 回答
0

一旦我包含了一个框架并在编译时唠叨armv7的链接器。现在你有了armv7s,也就是iphone5?

我的问题的解决方案是:从该框架中删除所有文件。编译该框架(仔细检查有效架构设置是否存在所需的架构重新添加新编译的框架。

尝试一下,也许它也可以帮助甚至解决您的问题!

于 2013-08-11T18:34:38.810 回答