移动开发:iOS学习之 编译错误汇总
2013-09-16 15:36
441 查看
1、error: macro names must be identifiers YourProject_prefix.pch
原因: 因为你弄脏了预处理器宏,在它处于<Multiple Values>的时候修改了它
解决方法: Configiration选择All Configirations,清空它 然后分别重新定义你的Debug,Release,Distributin预处理器宏吧
2、warning: no rule to process file '$(PROJECT_DIR)/LoadingView.h' of type sourcecode.c.h for architecture armv6
原因: Target里Compile Sources里含有头文件 了,那里面不需要头文件 解决方法: 从Target里Compile Sources里删除头文件
3、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里删除它
4、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),否则改了也白改
5、could not create bundle folder for versioned model *.moda(好像是这个后缀名的这个文件) 原因:编译一次会产生一个新的 解决办法:应该把编译产生出来的moda文件都删了,然后clean下工程,重新build即可
6、error:There are no valid certificate/private key pairs in the default keychain
7、error:Cannot assign to 'self' outside of a method in the init family 原因:只能在init方法中给self赋值,Xcode判断是否为init方法规则:方法返回id,并且名字以init
+大写字母开头+其他
为准则。例如:-
(id) initWithXXX; 出错代码:- (id) Myinit{ self
= [super init]; ……
} 解决方法:- (id) initWithMy { self
= [super init]; }
原因: 因为你弄脏了预处理器宏,在它处于<Multiple Values>的时候修改了它
解决方法: Configiration选择All Configirations,清空它 然后分别重新定义你的Debug,Release,Distributin预处理器宏吧
2、warning: no rule to process file '$(PROJECT_DIR)/LoadingView.h' of type sourcecode.c.h for architecture armv6
原因: Target里Compile Sources里含有头文件 了,那里面不需要头文件 解决方法: 从Target里Compile Sources里删除头文件
3、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里删除它
4、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),否则改了也白改
5、could not create bundle folder for versioned model *.moda(好像是这个后缀名的这个文件) 原因:编译一次会产生一个新的 解决办法:应该把编译产生出来的moda文件都删了,然后clean下工程,重新build即可
6、error:There are no valid certificate/private key pairs in the default keychain
7、error:Cannot assign to 'self' outside of a method in the init family 原因:只能在init方法中给self赋值,Xcode判断是否为init方法规则:方法返回id,并且名字以init
+大写字母开头+其他
为准则。例如:-
(id) initWithXXX; 出错代码:- (id) Myinit{ self
= [super init]; ……
} 解决方法:- (id) initWithMy { self
= [super init]; }
相关文章推荐
- iOS学习之 编译错误汇总
- C#开发之问题汇总-项目移动路径后编译或者发布错误
- iOS学习应用开发就业课_010:定时器和视图移动
- ios开发问题:添加库和复制其它工程文件编译错误问题
- IOS开发错误问题汇总(更新中)
- iOS开发脚踏实地学习day01-02-加法计算器和图片移动缩放旋转
- iOS开发笔记:编译时出现的错误和解决办法
- ios 开发中 --做登陆注册时编译出现的错误和解决方法
- <转>IOS开发笔记:编译时出现的错误
- 《Directx 9.0 3D 游戏开发编程基础》学习总结2--Init例程编译错误
- iOS开发之安全学习资料汇总,史上最全安全学习资料
- 源码推荐(8.26):毛玻璃效果,学习iOS开发技巧及第三方包的DEMO汇总
- ios开发——日常之Xcode编译Undefined symbols for architecture xxx 错误
- iOS 开发学习中的一些知识点汇总
- iOS 各种编译错误汇总
- iOS开发笔记:编译时出现的错误和解决办法
- iOS开发编译时候报的错误和解决办法收集
- iOS开发常见错误汇总-自己整理!
- iOS开发常遇错误之Xcode编译Undefined symbols for architecture xxx 错误总结
- iOS开发笔记-xcode7编译错误之缺少libc++.dylib