Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llv

这是在真机调试中出现的bug ,费了好多劲,终于将bug消除。

在此过程中非常感谢我iPhone开发群里面的几个兄弟 北京_合子,北京_长空,Oran,以及苏州—老猫 给我指点,让我没有浪费太多的时间解决了错误。

今将调试方法贴出,以此报谢 几个友善,乐于助人的兄弟。

ld: warning: directory not found for option '-L/Users/cindy/Desktop/项目名称/项目名称/ZBarSDK'

ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/cindy/Desktop/项目名称/ZBarSDK/libzbar.a for architecture armv7s
collect2: ld returned 1 exit status

Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1

这个错误中

Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1  这句报错,但是往往在百度,谷歌上面搜索而得不到结果,也就是说引起这种错误的原因可能是多方面造成的。我的错误是因为armv7s 。

仔细检查了下错误代码,发现主要是对几个第三方类库的不支持(比如lMobClickLibrary友盟,GDataXMLNode或者Admob类库神马的,具体是哪一个不支持就不清楚了)。

其中armv7s代表iphone5。


解决方法如下:

如图,通过PROJECT-Build Setting,然后把Build Active Architecture Only的值设置为Yes。



或者把Valid Architectures的值中的armv7s删除。

然后就只有静待第三方类库支持iOS6和iPhone5了。

 

在网上搜索 Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 failed with exit code 1 时候还发现两种解决办法,也是解决两种引起错误的可能性,在这都贴出来。

1,

在终端里输入:
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin

并回车,则可解决


2,有可能在项目中  将#import "XXX.h"误写成 #import "XXX.m"造成的。


如果再发下新的解决办法,我会及时更新。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值