将 iOS 项目转换为 ARC 时出现 Lipo 错误
Posted
技术标签:
【中文标题】将 iOS 项目转换为 ARC 时出现 Lipo 错误【英文标题】:Lipo error when coverting iOS project to ARC 【发布时间】:2013-04-29 01:30:57 【问题描述】:我正在尝试将我的 ios 项目转换为使用 ARC,但收到以下 lipo 错误是命令和错误
命令:
CreateUniversalBinary /Users/samichaudry/Library/Developer/Xcode/DerivedData/CartoonQuiz-bqmbxfcdkldmbqawgrfmjtebypuk/Build/Products/Debug-iphoneos/CartoonQuiz.app/CartoonQuiz normal "armv7 armv7s"
cd "/Users/samichaudry/Projetcs/CartoonQuiz/Application/V1.01 New Design Universal/Application"
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
lipo -create /Users/samichaudry/Library/Developer/Xcode/DerivedData/CartoonQuiz-bqmbxfcdkldmbqawgrfmjtebypuk/Build/Intermediates/CartoonQuiz.build/Debug-iphoneos/CartoonQuiz.build/Objects-normal/armv7/CartoonQuiz /Users/samichaudry/Library/Developer/Xcode/DerivedData/CartoonQuiz-bqmbxfcdkldmbqawgrfmjtebypuk/Build/Intermediates/CartoonQuiz.build/Debug-iphoneos/CartoonQuiz.build/Objects-normal/armv7s/CartoonQuiz -output /Users/samichaudry/Library/Developer/Xcode/DerivedData/CartoonQuiz-bqmbxfcdkldmbqawgrfmjtebypuk/Build/Products/Debug-iphoneos/CartoonQuiz.app/CartoonQuiz
错误:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo: can't figure out the architecture type of: /Users/samichaudry/Library/Developer/Xcode/DerivedData/CartoonQuiz-bqmbxfcdkldmbqawgrfmjtebypuk/Build/Intermediates/CartoonQuiz.build/Debug-iphoneos/CartoonQuiz.build/Objects-normal/armv7/CartoonQuizCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo failed with exit code 1
【问题讨论】:
【参考方案1】:lipo 引用的文件是否存在或大小为零?
尝试将您的构建目标更改为模拟器构建,清理并重新运行。
【讨论】:
感谢完美,我将目标设置为 iOS 设备但没有设备连接,将目标更改为模拟器修复了它。 只需更改为模拟器构建即可为我修复它。非常感谢! 一年多后仍然有用,我们刚刚接手开发这个应用程序,他们在二月份开始开发,他们没有使用 ARC...【参考方案2】:在离开armv7s
(找到here)的同时删除架构armv7
为我做了。
【讨论】:
【参考方案3】:我必须将 i386 添加到我的有效架构中才能使其正常工作。
【讨论】:
以上是关于将 iOS 项目转换为 ARC 时出现 Lipo 错误的主要内容,如果未能解决你的问题,请参考以下文章
GHUnit 在 iOS 项目中转换为 ARC 后给出 allocate_pages() 错误
使用静态库(facebook-ios-sdk)中定义的协议时出现不完整的协议警告
RestKit - Lipo 错误:无法在 Xcode5 中打开输入文件