Xcode编绎出错问题解决归类

  1. Choose a destination with a supported architecture in order to run on this device.  

     


    解决:

    Target -> Build Settings -> Build Options set the "Compiler for C/C++/Objective-C" -   选择"Default compiler (Apple LLVM 5.0)"

     




    2.clang: error: invalid deployment target for -stdlib 
    解决:

     



    3.ios使用AdMob出错-[GADObjectPrivate changeState:]: unrecognized selector sent
    解决:在Build Settings 中的Other Linker Flags中加入-ObjC


    4.'Undefined symbols for architecture i386:
    _OBJC_CLASS_$_Reachability", referenced  from objc-class-ref inViewController.o
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)'

    解决:问题原因:我xcode版本为4.5.1,在引入Reachability时候,4.5.1默认没有勾选targert,所以导致上述错误。


    5.ios6.0 storyboard编绎出错:'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate

    解决:storyboard or XIB tonot use Autolayout


    6.使用SDWebImage 第三方库出错
    Undefined symbols for architecture i386: "_OBJC_CLASS_$_MKAnnotationView", referenced from: l_OBJC_$_CATEGORY_MKAnnotationView_$_WebCache in MKAnnotationView+WebCache.o "_CGImageSourceCreateIncremental", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_CGImageSourceUpdateData", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_CGImageSourceCopyPropertiesAtIndex", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_CGImageSourceCreateImageAtIndex", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_kCGImagePropertyPixelHeight", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o "_kCGImagePropertyPixelWidth", referenced from: -[SDWebImageDownloader connection:didReceiveData:] in SDWebImageDownloader.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    解决:加入 MapKit  和  ImageIO 



    7.错误提示:* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '* -[NSCFArray insertObject:atIndex:]: mutating method sent to immutable object'
    问题出现在语句:
    [saveArray addObject:[NSNumber numberWithInt:saveNum]];
    可变的方法发送给一个不可变的对象

    ps:@property(nonatomic,retain) NSMutableArray * saveArray;
    前面已经赋值:

    NSMutableArray *array = [[NSMutableArray alloc] init];
    self.saveArray = array;
    [array release];



    解决方法:
    NSMutableArray *mutaArray = [[NSMutableArray alloc] init];
    [mutaArray addObjectsFromArray:saveArray];

    [mutaArray addObject:[NSNumber numberWithInt:saveNum]];

    self.saveArray = mutaArray
    [mutaArray release];






build 出现Dependency Analysis Error,Product.app出错,解决方法   

build 出现Dependency Analysis Error,Product.app出错,解决方法


Unable to run command ‘Cpresource  Product.app' - this target might include its own product.




  




解决方法:
TARGETS - Build Phases-Copy Bundle Resources-把Product.app删掉


 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值