标签:style class code tar color com
1.Method definition for ‘xxx‘ not found
-(id)initwithPage:(unsigned)pageNum {...}注意小写‘w’
-(id)initWithPage:(unsigned)pageNum {...}注意大写‘W’
UIStoryboard *sboard = [UIStoryboard storyboardWithName:@"StoryboardFileName" bundle:nil]; YourViewController *vc1 = [sboard instantiateInitialViewController];
5.Error:Terminating app due to uncaught exception ‘NSUnknownKeyException‘, reason: ‘[<ViewController 0x7d90880> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key currentTime.‘
my solution:
选中 ‘currentTime‘控件所在的storyboard(或nib),点击‘currentTime‘控件,storeboard左侧的View Controller Scene中的对应控件也会选中,在Scene选中控件中右键弹出窗口查找删除无效的Referencing Outlets连接,问题解决,
6.Error:-[__NSArrayI isEqualToString:]: unrecognized selector sent to instance 0x7d1b3c0
Terminating app due to uncaught exception ‘NSInvalidArgumentException‘, reason: ‘-[__NSArrayI isEqualToString:]: unrecognized selector sent to instance 0x7d1b3c0‘
my solution:
原来是我把NSMutableDictionary错写成NSMutableArray,包括相应的方法调用,改过来就好了,
7、error: macro names must be identifiers YourProject_prefix.pch
原因: 因为你弄脏了预处理器宏,在它处于<Multiple Values>的时候修改了它
解决方法: Configiration选择All Configirations,清空它 然后分别重新定义你的Debug,Release,Distributin预处理器宏吧
8、warning: no rule to process file ‘$(PROJECT_DIR)/LoadingView.h‘ of type sourcecode.c.h for architecture armv6
原因: Target里Compile Sources里含有头文件 了,那里面不需要头文件
解决方法: 从Target里Compile Sources里删除头文件
9、Command /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng failed with exit code 1
原因: png图像文件拷贝失败,看看信息上面提示Can‘t find哪个文件,一般都是从文件系统里删除文件而没有通过Xcode删除造成的,Xcode的项目配置文件依然纪录着这个文件的引用
解决办法: 给文件系统里增加相应的文件,或者从Xcode的Groups & Files删除它,或者从Target的Copy Bundle Resources里删除它
10、Code Sign error: The identity ‘iPhone Developer: Your Name‘ doesn‘t match any valid certificate/private key pair in the default keychain
原因: 签名错误
解决办法: Target -> Get Info -> Build -> Code Signing -> 修改签名
记得左上角的Configuration类型要跟当前Build类型对应(Debug, Release, Distribution),否则改了也白改
11、could not create bundle folder for versioned model *.moda(好像是这个后缀名的这个文件)
原因:编译一次会产生一个新的
解决办法:应该把编译产生出来的moda文件都删了,然后clean下工程,重新build即可
Xcode编译异常和警告汇总(持续更新中),布布扣,bubuko.com
标签:style class code tar color com
原文地址:http://www.cnblogs.com/limicheng/p/3808208.html