After modifying system headers, please delete the module cache at '/Users/XXX/Library/Developer/Xcode/DerivedData/XXXX/2ZMDAUJMMHSDC'

解决的方法:前往 '/Users/XXX/Library/Developer/Xcode/DerivedData/XXX/2ZMDAUJMMHSDC 这个目录,删除其目录中的内容。然后执行app,没问题了,注意不是删除 2NEVAP7X943D2 目录。而是当中的内容。然后再  clean下项目就能够了(product  -> clean)

參考:http://blog.csdn.net/lizhongfu2013/article/details/9106573

以下是收集到的一些错误整理了下:

从sdk3.2.5升级到sdk 7.1中间废弃了非常多的方法,另一些逻辑关系更加严谨了。

1,警告:“xoxoxoxo” 
is deprecated

解决的方法:查看xoxoxoxo的这种方法的文档,替换掉这种方法就可以。



2。警告:Declaration
of "struct sockaddr" will not be visible outside of this function

解决的方法:在你的开源.m文件里加入 #import <netinet/in.h>



3,警告:Implicit
conversion from enumeration type 'UIInterfaceOrientation' to different enumeration type 'UIDeviceOrientation'

解决的方法:类型不匹配。跳到出错的那一行。UIInterfaceOrientation强制转换为UIDeviceOrientation即可了。



4。警告:incompatible
pointer types assigning to 'MyArrayList*'from 'NSMutableArray'

解决的方法:增加强制转换(MyArrayList*)



5,警告:'&&'
within '||'

问题出处:

    if (exists && !isDirectory || !exists)………

  解决的方法: if ((exists && !isDirectory) || !exists)………



6,警告:Warning:The
Copy Bundle Resources build phase contains this target's Info.plist file

解决的方法:将Info.plist文件移到Resources文件夹下,而不要直接放在target下。

7。警告:在使用ASIHttp…第三方库的,执行报错。

解决的方法:看你的项目中是否加入CFNetwork.framework、SystemConfiguration.framework, MobileCoreServices.framework,

CoreGraphics.framework和libz.1.2.3.dylib,假设是sdk5.0以上,改加入libz.1.2.5.dylib



 8,警告:xxxooo。missing required architecture i386 in file 

解决的方法:假设是错误信息的话:Target->Build Settings->Search Paths, 删除FrameworkSearch Paths 里面内容就能够了。

要仅仅是一个警告的话,真机调试能够过。

详细解决方法待大神出现。

9,警告:

clang: error: no such file or directory: '/demo2/控件代码/13/Recorder/Recorder_Prefix.pch'

clang: error: no input files

Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1

解决的方法: 在你的主project文件 target搜素。pch ,找到Prefix Header    把它后面的值,都删除,再执行就攻克了。



10。警告:

“ARC
forbids synthesizing a property of an Objective-C object with unspecified ownership or storage attribute

解决的方法:假设定义了ARC有效,那么必需要有全部者属性的定义;所以代码改成以下这样

@property (nonatomic, strong, readonly) NSString *ss; 



11,警告:

io6一下的xib系统均没有自己主动选择Use
Autolayout。 Supporting iOS 5 and below with xib of iOS 6 

解决的方法:Just un-select “Use Autolayout” in the file inspector of the xib’s view and we are back to the familiar
autosizing in size inspector and boom, it supports iOS 5 and below.



12,警告:

Warning: Multiple
build commands for output file xxx.png 

解决的方法:找到项目里xxx.png反复。删除反复的资源。

//下面是升级到 xcode 5.0.1 之后使用遇到的警告

13,警告:

 “iOS
模拟器”未能安装此应用程序。

解决的方法:删除模拟器上当前要执行那个APP,又一次执行项目。就ok



14,警告:

SpringBoard无法启动应用程序
错误:-3

解决的方法:退出模拟器,又一次执行这个项目。

15。警告:

The server certificate
failed to verify.   

解决的方法:

1、打开终端(有用工具 -->终端)。在终端中输入例如以下命令:

svn ls https://192.100.1.11?

0/svn/xxxxxx(注意以下的url更换成你自己的url地址)

然后直接输入 “ p ”  确认,就能够又一次连接了。

16,警告:

Bitmasking for
introspection of Objective-C object pointers is strongly discouraged.   

解决的方法:

某数字& 0x1的时候是代表要取最低位是否为1,改成了  if(JK_EXPECT_F(((NSUInteger)object)%2))就可以。

17,警告:

Implicit conversion
loses integer precision: 'unsigned long' to 'CC_LONG' (aka 'unsigned int').   

解决的方法:

    CC_MD5(str,strlen(str), r);。改成了     CC_MD5(str, (CC_LONG)strlen(str), r);就可以。

18。警告:

error: failed
to launch '/private/var/mobile/Applications/xxxxx' -- failed to get the task for process 11140.   

解决的方法:

    重新启动你的开发手机就可以,另一种可能是你的开发人员证书与公布证书搞错了,检查在xcode中证书是否一直 。



19,警告:

error: ignoring
filxxxxxx/libBaiduMobStat.a, missing required architecture x86_64 in filexxxx/libBaiduMobStat.a   

解决的方法:

    targets ->build setting 下的  architectures 设置为 standard architetures(armv7,armv7s)   vaild architectures
设置为armv7,armv7s。



20,警告:

error: Directory
not found for option '-L/Users/joryoubonxx/BaiduStatistic   

解决的方法:

  删除  targets ->build setting 下的  library search path不对的地址,假设还不行。又一次加入第三库、clean ,重新启动Xcode.就可以。

遇到相关的警告。一般编译器都会提供解决方式,所以,作为新手。我们应该看懂编译器给我们的提示,这样我们解决这个问题就会事半功倍。

1,  错误信息:

  "_OBJC_CLASS_$ 
xxxxx  ", referenced from:

      objc-class-ref in ViewController.o

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

解决方法:

 查看project,看是不是没有导入相关的框架。

或者project里加入的有同样".m",".h" 文件



2,  错误信息:

Couldn't register dy.CKRiLiText with the bootstrap server. Error: unknown error code.

This generally means that another instance of this process was already running or is hung in the debugger.Current language:  auto; currently objective-c

解决方法: 可能是电脑内存问题引起,重新启动电脑就可以解决。假设重新启动解决不了问题,那就是你刚刚修改的代码引起的问题。



3
、 错误信息:

ios
5是调试正常的,ios 6真机调试的时候,出现例如以下错误:ld:
file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/mac4/Desktop/my desktop/My app/MyApp name 20:09:12  /MyApp name/ZBarSDK/libzbar.a for architecture armv7serror: linker
command failed with exit code 1 (use -v to see invocation)

解决方法:在Xcode里,点击对应的Target,然后点Build
Settings。找到VALID_ARCHS。看里面的是不是arvm7s,假设不是改成arvm7s就能够了。



4
、 错误信息:

 error: receiver type 'ViewController' for instance message does not declare a method with selector 'hideSearchBar:' [4]

ViewController 中没有声明一个方法选择'hideSearchBar:

解决方法:

在ViewController .h 中声明一下这种方法 “ hideSearchBar ”  就可以。

5、
错误信息:当json从服务端请求时得到的字符串,假设这样写的话。会报错。';'
after top level declarator

NSString *ss= @"{"recommend":"世界末日","dogname":"机器人"}";  

解决方法:

就是,把   “   替换成  \"  就可以。NSString
*ss= @"{ \"recommend \": \"世界末日 \", \"dogname \": \"机器人 \"}";  



6
、 错误信息:

 error: Existing instance variable '_datasource' for property 'datasource' with  assign attribute must be __unsafe_unretained

解决方法:

     id<ListViewDataSource> _datasource; 改为     __unsafe_unretained id<ListViewDataSource>
_datasource:就可以



7
、 错误信息:

error: No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).

解决方法:

     targets ->build setting 下的 Build Active Architecture Only 设置 NO  就可以.

。警告:

 warning: Semantic
Issue: Incompatible integer to pointer conversion assigning to 'BOOL *' (aka 'signed char *') from 'BOOL' (aka 'signed char')



解决的方法:
检查 BOOL *换为BOOL就能够了,检查是不是多写一个   *  号。

32:Jsonkit中的警告



Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()

object->isa 替换为 object_getClass(object)

keyObject->isa 替换为 object_getClass(keyObject)

(id)keys[idx]->isa 替换为 object_getClass((id)keys[idx])



format specifies type 'unsigned long' but the argument has type 'nsuinteger' (aka 'unsigned int')

给变量添加(unsigned long)进行类型转换





33:md5加密(iOS SDK中自带了CommonCrypto



Implicit declaration of function 'CC_MD5' is invalid in C99



[plain] view plaincopy



    #define CC_MD5_DIGEST_LENGTH 16  

    +(NSString *)MD5HashForString:(NSString *)input {  

        const char *cStr = [input UTF8String];  

        unsigned char result[CC_MD5_DIGEST_LENGTH];  

        CC_MD5(cStr, strlen(cStr), result);  

        return [NSString stringWithFormat: @"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",  

                result[0], result[1], result[2], result[3],  

                result[4], result[5], result[6], result[7],  

                result[8], result[9], result[10], result[11],  

                result[12], result[13], result[14], result[15]];  

    }  



引入函数定义的头文件



#import <CommonCrypto/CommonDigest.h>





34:ASIDataDecompressor中的警告



format specifies type  'short' but the  argument has type 'int'



在+ (NSError *)deflateErrorWithCode:(int)code 和 +(NSError *)inflateErrorWithCode:(int)code中



[NSString stringWithFormat:@"Compression of data failed with code %hi",code] 中



将code改为 (short)code,类型转换





35:Reachability中警告



Using 'stringWithString:' with a literal is redundant



statusString = [NSString stringWithString: @"Not Reachable"]; 



改为:statusString = @"Not Reachable";





36.format specifies type 'id' but the
argument has type 'const char *'



NSCAssert(NO, @"Unhandled error encountered during SAX parse. msg is %@", msg);

改为:NSCAssert(NO, @"Unhandled error encountered during SAX parse. msg is %@", [NSString stringWithUTF8String:msg]);



37 Using
'stringWithString:' with a literal is redundant

改为:self.locationInput.text = @"captured change";





38 在项目中设置控件的layer属性时。会错误发生,

"Property 'c' cannot be found in forward class object 'CALayer *",



这时须要引入  #import <QuartzCore/CALayer.h>。

41,错误



Error launching remote program: failed to get the task for process   



解决方法:

把真机上的软件。删除,然后,clean 一下,又一次执行就能够了。



        

42,真机调试的时候。出现   

  
这正常,可是不识别机器的。



解决方法:



把 , 

 设置为以上相相应的版本号就能够了。



43,真机调试的时候,出现   ios Broken pipe



解决方法:

:推出xcode

:断开机器(iphone,ipad,ipod)链接

:重新启动iPhone在联接xcode,就能够了。

iOS真机调试中出现identity(The
identity 'iPhone Developer)证书不匹配的问题



提示(null) error: could not read CFBundleIdentifier from Info.plist (null)



新建一个同名project,拷贝其plist文件,将原project中的plist文件替换掉就可以

这个问题怎么解决呀  求解答  scanf函数输入就会弹出 
图片:屏幕快照 2013-11-12 下午12.40.18.png 

刚開始学习的人还在用xcode 写c 
图片:屏幕快照 2013-11-12 下午12.38.34.png 


44、-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController"
nib but the view outlet was not...

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXVhbnFpbnlhbmc=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">

IOS开发错误的更多相关文章

  1. ios开发——错误总结篇&开发中常见错误和警告总结(四)

    ios开发——开发总结&开发中常见错误和警告总结(四) 网易彩票实战总结(错误) 错误总结之类的实现 经典错误之重复定义与导入错误 经典错误关于父类的实现 通知对象: 控制器的定义 Xcode ...

  2. ios开发错误笔记

    今天的奇葩错误,最后解决方式是删除了手机上面的快捷方式,然后再clean,然后再重启了xcode.无语了,xcode也经常出些奇葩问题,真无语啊. ios技术交流群:378501081..期待你加入. ...

  3. iOS开发错误汇总

    人非圣贤孰能无过 dyld: Library not loaded: /... 过而能改善莫大焉 iOS下dyld: Library not loaded: 错误信息解决方案

  4. ios开发错误之: Undefined symbols for architecture x86_64

    错误如下: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_RoutingHTTPServer", refere ...

  5. iOS开发错误日志

    错误提示:fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platfor ...

  6. IOS开发错误提示原因集合-----长期更新

    "[__NSCFConstantString size]: unrecognized selector sent to instance." =>将NSString类型的参数 ...

  7. IOS 开发中 Whose view is not in the window hierarchy 错误的解决办法

    在 IOS 开发当中经常碰到 whose view is not in the window hierarchy 的错误,该错误简单的说,是由于 "ViewController" ...

  8. iOS开发 - OC - duplicate symbol _OBJC / undefind symbol 错误的相关处理

    前言: 作为一个iOS开发,相信大家都会遇到类似于 “duplicate symbol” 的程序报错. 对于很多新手来说,可能会有点手足无措,因为这种类型的报错一般并非是代码的逻辑错误,大部分情况下是 ...

  9. iOS开发关于Block代码错误

    本文永久地址为http://www.cnblogs.com/ChenYilong/p/4052362.html ,转载请注明出处. iOS开发关于Block代码错误 Incompatible bloc ...

随机推荐

  1. JS框架的实现

    众多流行的JS库都不同程度的污染了原生JS,最典型的如Prototype ,Mootools .JQuery则完全例外,一个匿名函数执行后便诞生了集所有API为一身的强大 $ .虽然如此,JQuery ...

  2. WebDriver自动化测试工具(3)---PhantomJS的使用

    PhantomJS是一个基于webkit的javascript API.它使用QtWebKit作为它核心浏览器的功能,使用webkit来编译解释执行JavaScript代码.任何你可以在基于webki ...

  3. Mac安装Maven

    1.从官网(https://maven.apache.org/download.cgi)下载 Maven 并解压. 2.配置环境 .  vim ~/.bash_profile export MAVEN ...

  4. sonarQube安装及本机扫描C#项目

    因项目需要,需要使用sonarQube对代码进行扫描并查看,因对sonarQube不熟悉,所以先在本机搭建测试环境. 参考了张老师的博客:http://www.cnblogs.com/danzhang ...

  5. 设置iframe 载入页面的效果跟直接打开这个页面一样

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xht ...

  6. LOJ #6284. 数列分块入门 8-分块(区间查询等于一个数c的元素,并将这个区间的所有元素改为c)

    #6284. 数列分块入门 8 内存限制:256 MiB时间限制:500 ms标准输入输出 题目类型:传统评测方式:文本比较 上传者: hzwer 提交提交记录统计测试数据讨论 2   题目描述 给出 ...

  7. SpringBoot+Mybatis整合实例

    前言 大家都知道springboot有几大特点:能创建独立的Spring应用程序:能嵌入Tomcat,无需部署WAR文件:简化Maven配置:自动配置Spring等等.这里整合mybatis,创建一个 ...

  8. C#代码规范化(代码风格化)的几个函数

    近期由于适配Oracle的缘故,将旺财C#.NET代码生成器增加了风格化的几个函数,具体实现如下功能: 1.转换为Pascal风格,如User_Name/USER_NAME/UserName自动替换下 ...

  9. import 和 export -- ES6

    例子: 最后返回的结果是: { default: function fn2(){ }, foo2: 1, test3: { default: function fn3(){ }, foo3: 1 } ...

  10. HihoCoder - 1715 树的连通问题

    题面在这里! 正式告别文化课回归的第一题QWQ,然鹅半个月之后还是要退役QWQWQWQWQ 好像很久之前就见过的一个题,当时只会打一打 O(N^2) 的暴力QWQ,正好今天又写了遍这个暴力用来对拍23 ...