Xcode编译错误:Lipo: can't open input file


/fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/zicjin/Library/Developer/Xcode/DerivedData/Baozou-iOS-gsgjiwiqjwffeheenpeffrqpytqx/Build/Intermediates/Baozou-iOS.build/Debug-iphoneos/Baozou-iOS.build/Objects-normal/armv7/Baozou-iOS (No such file or directory)

使用虚拟机运行时编译不会报错,一旦切换到真机(5s)运行时编译就会这样报错,stackoverflow上搜了几个回答都无效。
移除了arm64,且ONLY_ACTIVE_ARCH为NO,保证不使用64bit
源码 或者仅仅帮我执行一次5s的编译看看有么有问题,我怀疑是我本机MAC OS的问题,我手头没有第二台mac,

ios xcode objective-c

春哥教大神官 10 years, 4 months ago

请尝试以下设置:

  1. TARGET -> BUILD SETTINGS -> BUILD ACTIVE ARCHITECTURES ONLY . 设置为 YES.
  2. TARGET -> BUILD SETTINGS -> Linking -> Other Linker Flags : $(OTHER_LDFLAGS)

然后clean 并重新build 你的project。

如果还有问题,你可能需要把 Valid Architectures里的armv7 或者 armv7s给移除。

vivian answered 9 years ago

Your Answer