将非ARC项目转换为ARC错误



当我将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

有没有人能告诉我如何解决这个问题?

如果你正在使用不支持ARC的第三方库,你应该在你的构建阶段/编译源中添加这个标志到有问题的文件(只阻止这些文件上的ARC)。这将帮助您确定是您的代码问题还是您正在使用的库(如果是这种情况)。

-fno-objc-arc

尝试使用这个

我通过改变项目>构建设置架构中从默认的"armv6 armv7"到"armv7"中发现的有效架构的值来解决这个问题。

确保在每个实现文件中添加了-fno-objc-arc标志。m文件).

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

最新更新