0

当我将iPhone项目转换Objective - c ARC为时,我总是遇到同样的错误:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't figure out the architecture type of: /Users/user/Library/Developer/Xcode/DerivedData/TestApp-fktzngidcyimjibgdosyphgbuzpe/Build/Intermediates/TestApp.build/Debug-iphoneos/TestApp.build/Objects-normal/armv7/TestAppCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo failed with exit code 1

请有人可以建议我如何解决这个问题?

4

3 回答 3

1

If you are using 3rd party libraries that don't support ARC you should just add this flag to the files in question in your build phases/compile sources (prevents ARC on only those files). This should help you determine if your code is the issue or the library you are using (if that's the case).

-fno-objc-arc
于 2013-06-04T12:40:07.620 回答
0

尝试使用这个

我通过将 Project > Build Settings Architectures 中的 Valid Architecture 的值从默认的“armv6 armv7”更改为“armv7”来解决了这个问题。希望这可以帮助。

于 2013-06-04T12:41:08.280 回答
0

确保将 -fno-objc-arc 标志添加到每个实现文件(.m 文件)。

然后清理项目(项目菜单 -> 清理)并再次构建。在课堂上这样做时,我有时不得不清洁和建造两次。好像是个小bug。

于 2013-06-04T12:52:14.027 回答