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. bzoj4756 [Usaco2017 Jan]Promotion Counting

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4756 [题解] dsu on tree,树状数组直接上 O(nlog^2n) # inclu ...

  2. #error#学习方法,如何避免初始化错误

    #error#学习方法,如何避免初始化错误.错误来自:本博客的另一篇文章Demo示例程序源代码: ,01-导航实例-QQ空间.xcodeproj - CYLLoginViewController.mD ...

  3. 【洛谷 P4886】 快递员 (点分治)

    这题因为一些小细节还是\(debug\)了很久...不过我第一次用脚本对拍,不亏. 先随便找一个点作为根,算出答案,即所有点对到这个点的距离和的最大值,并记录所有距离最大的点对.如果这个点在任意一个距 ...

  4. IPsec传输模式下ESP报文的装包和拆包过程

    原创文章,拒绝转载 装包过程 总体流程图 过程描述 在原IP报文中找到TCP报文部分,在其后添加相应的ESP trailer信息. ESP trailer 包含三部分:Padding,Pad leng ...

  5. http://www.himigame.com/mac-cocoa-application/893.html

    [Cocoa(mac) Application 开发系列之一]创建第一个application—计算器 终于HTTP与Socket服务器以及cocos2dx之间的通信各种框架成功完成后,现在抽时间学习 ...

  6. 精确解释Unicode

    来自:http://blog.csdn.net/gqqnb/article/details/6266542 ---------------------------------------------- ...

  7. python的一致性(1)sorted和len

    每个语言,都有自己的特性,而一致性,是python语言特性重要的一个环节. 比如排序,我们不是aaa.sort(),而是 sorted(aaa),比如len,不是aaa.length(),而是len( ...

  8. 【转】SonarQube配置自定义的CheckStyle代码规则

    原文地址:https://www.jianshu.com/p/ff1d800885ce 惯例第一步肯定是SonarQube的安装与运行配置了,但这部分不在本文主题内,网上一搜一大把,这里就不讲了,大家 ...

  9. [ThinkPHP] 从一个表中获得栏目对应的ID,从另一个表获得属于这些栏目的文章

    public function index(){ $cate = 1; $query = M('Cate')->field('id')->where(array('id'=>$cat ...

  10. HDU 1308 What Day Is It?(模拟,日期)

    解题报告:输入一个年月日,让你求出那一天是星期几,但是做这题之前必须先了解一点历史.首先在1582年之前,判断是否是闰年的标准是只要能被四整除就是闰年, 然后在1752年9月2号的后的11天被抹去了, ...