Xcode编绎及App上传出错问题解决

来源:互联网 发布:ubuntu设置断电自启动 编辑:程序博客网 时间:2024/06/14 01:10

 

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];


8.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删掉


9.UIPopoverController在Arc中编绎crash解决方法

- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController
{
    self.popViewPop = nil;
}

10.上传出现问题
ERROR ITMS-9000: "this bundle is invalid. armv7s are required to include armv7 architecture." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage).





解决方法:


把Build Active Arch Only参数的值,改为NO就可以了。



0 0