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

}

8、Storyboards are unavailable on iOS 4.3 and prior

解决办法:需要清除~/Library/Developer/Xcode/DerivedData中对应当前项目的文件夹,然后重新编译就没问题了,这应该是Xcode4.5.1的一个bug。

9、Application windows are expected to have a root view controller at the end of application launch

解决方法:在ios5以上版本,应用程序加载时,需要一个 root view controller ,所以需要编写代码

_rootViewController = [[RootViewController alloc] init];

self.window.rootViewController = _rootViewController;

10、error: failed to attach to process ID 0

解决方法:

1)delete the App directy under ~/Library/Developer/Xcode/DerivedData

2) start Xcode, in the menubar Project -> Clean

欢迎园子里的码农们   楼下补充\(^o^)/~

Xcode编译错误和警告汇总的更多相关文章

  1. Xcode编译错误和警告汇总<转>

    1.error: macro names must be identifiers YourProject_prefix.pch 原因: 因为你弄脏了预处理器宏,在它处于<Multiple Val ...

  2. Xcode编译异常和警告汇总(持续更新中)

    1.Method definition for 'xxx' not found xxx的方法没有实现 出现原因.h声明了xxx方法但是.m没有实现xxx方法 解决方法:在类的.m文件实现xxx方法   ...

  3. 我看见的第一个XCODE编译错误 - Command /applications.../clang failed with exit code 1

    开始用XCODE学习Apple相关开发的东东,写些demo熟悉Object C,一直还没看见什么问题,昨晚在家把一些demo上传到代码服务器,今天在另外一台机器上下载下来编译,出现了问题: Preco ...

  4. xcode编译错误

    1.xcode无效文件的编译错误. 问题: clang: error: no such file or directory: '/Users/admin/client/trunk/sengoku_sc ...

  5. linker command failed with exit code 1 (use -v to see invocation),经典Xcode编译错误的出现和解决!

    linker command failed with exit code 1 (use -v to see invocation)这个肯定是个xcode编译运行的时候经典的报错了. 这个问题曾经在我的 ...

  6. xcode 编译错误找不到 libz.dylib

    图片对应的是libxml2.dylib  (libz.dylib 遇到的编译错误跟这个类似) 解决方法是在引入库的地方调整原先 比如libz.dylib 的目录: ================== ...

  7. Xcode编译错误集锦

    1.在将ios项目进行Archive打包时,Xcode提示以下错误: [BEROR]CodeSign error: Certificate identity ‘iPhone Distribution: ...

  8. MDK 编译错误和警告 使用时遇到的小问题

    main.c(32): warning:  #1-D: last line of file ends without a newline 这个是由于在main函数的“}”后,没有加回车. 只要在mai ...

  9. xcode编译错误总结

    No architectures to compile for(ONLY_ACTIVE_ARCH=YES 这种错误    修改building settings下 Build Active Archi ...

随机推荐

  1. 51nod 1791 合法括号子段

    有一个括号序列,现在要计算一下它有多少非空子段是合法括号序列. 合法括号序列的定义是: 1.空序列是合法括号序列. 2.如果S是合法括号序列,那么(S)是合法括号序列.3.如果A和B都是合法括号序列, ...

  2. 51nodeE 斜率最大

    题目传送门 这道题只要证明最佳解一定在相邻两个点之间的好啦 这个自己证一证就okay啦 而且我发现n方的算法可以过耶... #include<cstdio> #include<cst ...

  3. win8优化

    微软发布win8系统之后受到很多电脑爱好者的关注,都想去尝试体验win8操作系统,对电脑系统优化和系统性能提高一直是我们所追求的.而很多用户都会选择第三方软件对系统进行相关优化,其实我们可以手动对电脑 ...

  4. 5.shell运算符

    无论是哪门语言,运算都是跑不掉的,shell中如何进行运算呢?语法: $((运算式))或者 $[运算式]expr 运算式.

  5. jquery 操作dom效率测试------html和append插入文档

    $(function () { var htmlResult = createHtmlContent(100); console.log(htmlResult) insertHtml.call($(& ...

  6. python Tk()生成的桌面的具体设置方法

    rom tkinter import * root = Tk() root['height'] = 300 #设置高 root['width'] = 500 #设置宽 root.title('魔方小站 ...

  7. ros下xtion用法

    xtion用openni2_launch openni2.launch就可以打开,但是在使用过程中有一些定制性问题: 首先弄清openni2_launch 中一些topic都是什么意思 http:// ...

  8. Python 进阶 之 traceback模块

    Traceback模块官方英文描述: Help on module traceback: NAME traceback - Extract, format and print information ...

  9. springboot 通用Mapper使用

    https://blog.csdn.net/dwf_android/article/details/79359360 https://www.cnblogs.com/larryzeal/p/58741 ...

  10. Docker背后的内核知识:命名空间资源隔离---亲测

    参考URL: https://linux.cn/article-5057-1.html 实现代码(网络和用户空间只是看懂了) 实际上,Linux内核实现namespace的主要目的就是为了实现轻量级虚 ...