解决办法:查看xoxoxoxo的这个方法的文档,替换掉这个方法即可。
2,警告:Declaration of "struct sockaddr" willnot be visible outside of this function
解决办法:在你的开源.m文件中添加 #import
3,警告:Implicit conversion from enumerationtype 'UIInterfaceOrientation' to different enumeration type'UIDeviceOrientation'
解决办法:类型不匹配。跳到出错的那一行,UIInterfaceOrientation强制转换为UIDeviceOrientation就行了。
4,警告:incompatible pointer types assigning to'MyArrayList*'from 'NSMutableArray'
解决办法:加入强制转换(MyArrayList*)
5,警告:'&&'within '||'
问题出处:
6,警告:Warning:The Copy Bundle Resources build phasecontains 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
解决办法:如果是错误信息的话:
要只是一个警告的话,真机调试可以过。具体解决方法待大神出现。
9,警告:
clang: error:
clang: error: no input files
Command/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clangFailed with exit code 1
解决办法: 在你的主工程文件 target搜素,pch ,找到PrefixHeader
10,警告:
“ARCforbids synthesizing a property of an Objective-C object withunspecified ownership or storageattribute
解决办法:如果定义了ARC有效,那么必须要有所有者属性的定义;所以代码改成下面这样
@property
11,警告:
io6一下的xib系统均没有自动选择UseAutolayout, Supporting iOS 5 and below with xib of iOS6
解决办法:Just un-select “Use Autolayout” in the file inspector of thexib’s view and we are back to the familiar autosizing in sizeinspector and boom,it supports iOS 5 and below.
12,警告:
Warning:
解决办法:找到项目里xxx.png重复,删除重复的资源。
//以下是升级到 xcode 5.0.1之后使用遇到的警告
13,警告:
解决办法:删除模拟器上当前要运行那个APP,重新运行项目。就ok
14,警告:
SpringBoard无法启动应用程序错误:-3
解决办法:退出模拟器,重新运行这个项目。
15,警告:
Theserver certificate Failed to verify.
解决办法:
1、打开终端(实用工具 -->终端),在终端中输入如下命令:
svn ls
然后直接输入 “ p ”
16,警告:
Bitmaskingfor introspection of Objective-C object pointers is stronglydiscouraged.
17,警告:
Implicitconversion loses integer precision: 'unsigned long' to 'CC_LONG'(aka 'unsigned int').
18,警告:
error:Failed to launch '/private/var/mobile/Applications/xxxxx' -- Failed to get the task for process11140.
遇到相关的警告,一般编译器都会提供解决方案,所以,作为新手,我们应该看懂编译器给我们的提示,这样我们解决问题就会事半功倍。
1,错误信息:
@H_542_301@"_OBJC_CLASS_$xxxxx ",referenced from:
objc-class-refin ViewController.o
ld: symbol(s) not found for architecture i386
clang: error:linker command Failed with exit code 1(use -v to see invocation)
解决方法:
@H_542_301@查看工程,看是不是没有导入相关的框架。或者工程里添加的有相同".m",".h"文件
2,错误信息:
Couldn't register dy.CKRiLiText with the bootstrapserver. Error:@H_542_301@unknown errorcode .
This generally means that another instance of this process wasalready running or is hung in the debugger.Currentlanguage: auto; currentlyobjective-c
解决方法:@H_542_301@可能是电脑内存问题引起,重启电脑即可解决。如果重启解决不了问题,那就是你刚刚改动的代码引起的问题。
3 、错误信息:
@H_542_301@ios5是调试正常的,ios6真机调试的时候,出现如下错误: ld:file is universal (3 slices) but does not contain a(n) armv7sslice: /Users/mac4/Desktop/my desktop/My app/MyApp name 20:09:12/MyApp name/ZBarSDK/libzbar.a for architecturearmv7s
@H_542_301@error:linkercommand Failed with exit code 1 (use -v to seeinvocation)
解决方法:
在Xcode里,点击相应的Target,然后点BuildSettings,找到VALID_ARCHS,看里面的是不是arvm7s,如果不是改成arvm7s就可以了。
4、 错误信息:
error:receiver type 'ViewController' forinstance message does not declare a method with selector'hideSearchBar:'[4]
ViewController中没有声明一个方法选择'hideSearchBar:
解决方法:
在ViewController.h 中声明一下这个方法 “hideSearchBar ” 即可。
5、错误信息:当json从服务端请求时得到的字符串,如果这样写的话,会报错, @H_542_301@';'after top leveldeclarator
@H_542_301@NSString *ss=@"{"recommend":"世界末日"," @H_542_301@@H_542_301@dogname ":"机器人"}";
解决方法:
就是,@H_542_301@把“@H_542_301@替换成@H_542_301@\"即可。
@H_542_301@NSString*ss=@"{
@H_542_301@@H_542_301@@H_542_301@\"
recommend
:
世界末日
,
dogname
机器人
}";
6 、错误信息:
error:Existing instance variable '_datasource' for property 'datasource'with assign attribute must be__unsafe_unretained
id _datasource; 改为__unsafe_unretained id _datasource:即可
ld: symbol(s) not found for architecture i386
clang: error:
2,
Couldn't register dy.CKRiLiText with the bootstrapserver. Error:
This generally means that another instance of this process wasalready running or is hung in the debugger.Currentlanguage:
解决方法:
3 、错误信息:
@H_542_301@ios5是调试正常的,ios6真机调试的时候,出现如下错误: ld:file is universal (3 slices) but does not contain a(n) armv7sslice: /Users/mac4/Desktop/my desktop/My app/MyApp name 20:09:12
4、 错误信息:
解决方法:
在ViewController.h 中声明一下这个方法 “
5、错误信息:当json从服务端请求时得到的字符串,如果这样写的话,会报错, @H_542_301@';'after top leveldeclarator
@H_542_301@NSString *ss=@"{"recommend":"世界末日"," @H_542_301@@H_542_301@dogname ":"机器人"}";
解决方法:
就是,@H_542_301@把
6 、错误信息:
31
,
警告:
warning:SemanticIssue: Incompatible integer to pointer conversion assigning to'BOOL *' (aka 'signed char *') from 'BOOL' (aka 'signedchar')
解决办法 :检查 BOOL *换为BOOL就可以了,检查是不是多写一个* 号。
32:Jsonkit中的警告
Direct access to objective-c's isa is deprecated in favor ofobject_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 inC99
[plain] view plaincopy
#defineCC_MD5_DIGEST_LENGTH16
+(NSString*)MD5HashForString:(NSString *)input{
constchar *cStr = [inputUTF8String];
unsignedcharresult[CC_MD5_DIGEST_LENGTH];
CC_MD5(cStr,strlen(cStr),result);
return[NSString stringWithFormat:@"xxxxxxxxxxxxxxxx",
result[0],result[1],result[2],result[3],255)">result[4],result[5],result[6],result[7],255)">result[8],result[9],result[10],result[11],255)">result[12],result[13],result[14],result[15]];
}
引入函数定义的头文件
#import
34:ASIDataDecompressor中的警告
format specifies type'short'but theargument 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 isredundant
statusString = [NSString stringWithString: @"NotReachable"];
改为:statusString = @"Not Reachable";
36.format specifies type'id' but the argument has type 'const char*'
NSCAssert(NO,@"Unhandled error encountered during SAX parse. msgis %@",msg);
改为:NSCAssert(NO,@"Unhandled error encountered during SAX parse.msg is %@",[NSString stringWithUTF8String:msg]);
37Using'stringWithString:' with a literal isredundant
改为:self.locationInput.text = @"captured change";
38 在项目中设置控件的layer属性时,会发生错误,
"Property 'c' cannot befound in forward class object 'CALayer *",
这时需要引入#import 。
解决办法 :检查 BOOL *换为BOOL就可以了,检查是不是多写一个
32:Jsonkit中的警告
Direct access to objective-c's isa is deprecated in favor ofobject_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 inC99
[plain] view plaincopy
引入函数定义的头文件
#import
34:ASIDataDecompressor中的警告
format specifies type
在+ (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 isredundant
statusString = [NSString stringWithString: @"NotReachable"];
改为:statusString = @"Not Reachable";
36.format specifies type'id' but the argument has type 'const char*'
NSCAssert(NO,@"Unhandled error encountered during SAX parse. msgis %@",msg);
改为:NSCAssert(NO,@"Unhandled error encountered during SAX parse.msg is %@",[NSString stringWithUTF8String:msg]);
37
改为:self.locationInput.text = @"captured change";
38 在项目中设置控件的layer属性时,会发生错误,
"Property 'c' cannot befound in forward class object 'CALayer *",
这时需要引入
41,错误
Error launching remote program: Failed to get the task forprocess
解决方法:
把真机上的软件,删除,然后,clean 一下,重新运行就可以了。
42,真机调试的时候,出现[attachment=49364]这正常,但是不识别机器的。
把 , [attachment=49365] 设置为以上相对应的版本就可以了。
43,真机调试的时候,出现 ios Brokenpipe
:推出xcode
:断开机器(iphone,ipad,ipod)链接
:重启iPhone在联接xcode,就可以了。
Error launching remote program: Failed to get the task forprocess
解决方法:
把真机上的软件,删除,然后,clean 一下,重新运行就可以了。
42,真机调试的时候,出现
把 , [attachment=49365] 设置为以上相对应的版本就可以了。
43,真机调试的时候,出现
:推出xcode
:断开机器(iphone,ipad,ipod)链接
:重启iPhone在联接xcode,就可以了。
提示(null) error: could not read CFBundleIdentifier from Info.plist(null)