IOS常见错误分析解决(一直更新) 你值得收藏-综合贴
2014-05-08 12:57
441 查看
-来自收藏总结 综合了好多的常见错误
1:clang failed with exit code 254
一:检测代码中 是否 有 NSLog 打印了 返回 void 的值.
2:Verify exit code of build task with internal identifier 'CopyPNGFile 123.png'
一:将出错的png,用PhotoShop重新转换一次, 如果PhotoShop打不开,改后缀为Jpg 试试. 转换时,请使用 :存储为Web或设备所使用的格式格式转换成 PNG-24这样的图片大小比较合适
3:
一:确定静态库中是否有自定义的类文件,如果一个也没有,就会出现这种错误,这也是为什么新建的静态库都包含一个默认的类.
4: _OBJC_CLASS_$_UIMainKpiXML", referenced from:
1:检测类文件是否已经指定了Project Target
2:检测类文件是否在Bulid Phases 中的 Compile
Source 是否包含了这个类文件
以上两步都检查完成以后,如果编译还报错误,请尝试彻底关闭XCode 再次编译试试.
5: for architecture armv7s
以下摘自: http://stackoverflow.com/questions/12570116/what-is-the-difference-between-arm7-and-arm7s
Yes you are right about armv7s is about the iPhone 5. Here some summary info I found on the web:
ARMv6 ISA (used by the ARM11 core in the iPhone 2G and iPhone 3G)
ARMv7 (used by modern ARM cores, iPhone 3GS, iPhone 4 and 4S)
ARMv7s (new A6 SoC for iPhone 5).
注:错误含义表示 指定的framework 不支持对 armv7s 的支持, 也就不支持搭载A6处理器的iPhone 5.
如果在编译framework或者静态库的工程中依旧编译时,可能是以下设置导致,设置为NO即可
6: Local declaration of '' hides instance variable
1:私有变量与属性变量同名所致
7:Instance variable '' accessed in class method
1:在静态方法不能使用到类的属性变量,否则就报上面的错误
8:ld: symbol(s) not found for architecture i386
1:里面意思说:"_stroyboard" 这个属性在目标类中 根本就没声明!
那就声明一下咯? 注:XCode4.5 会默认声明了,但是只是针对自定义类,系统类还没有. 所以,小心
@synthesize storyboard;
9:PerformSelector may cause a leak because its selector is unknown
通过如下代码解决产生的编译器警告
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
[self performSelector:nextView];
#pragma clang diagnostic pop
来源:(http://www.ooso.net/archives/620)
10:unable to open executable
1:检测同一个静态库或工程中是否有两个或以上的想同类文件存在
2:删除模拟器中的应用,删除DerivedData文件夹 重新启动XCode.
11: Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
不要在头文件声明变量命名是以new copy开头
参考:http://kongbei888.blog.163.com/blog/static/24326613201261902510652/
12:ld: file not found:
1:指向的静态库没有找到
14: _utf8_countTrailBytes
add library libicucore.dylib
15:Stray "@" in program
工程使用的编译器版本过低所致. 修改编译器版本至最新版本,如下图:
参考:http://stackoverflow.com/questions/12821938/stray-in-program-with-nsdictionary-definition
1.将Build Settings 中Architectures ——> Valid Architectures的arm64删掉,只留armv7、armv7s
2.同上,将Architectures ——>Architectures改为 $(ARHS_STANDARD)armv7,armv7s
3.把Build Active Architecture Only 改为NO
4.编译即可
17.编译时出现:Not supported ARM architecture
解决办法:在./configure
时加入 -D__ARM_ARCH_5TEJ__
另外一篇:Android常见错误分析
18.Couldn't register xxx.xx.xx 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.
每个在xcode下用ios模拟器做开发的开发者都应该会遇到过上面所示的错误,目前找到最行之有效的解决办法是重启手机。不行了也顺便把电脑重启下。 建议以后记得stop就行了 不要正运行着就直接卸载了程序
本文一直更新希望大家踊跃回复自己知道的常见error 来参与本文的更新^_^
1:clang failed with exit code 254
一:检测代码中 是否 有 NSLog 打印了 返回 void 的值.
2:Verify exit code of build task with internal identifier 'CopyPNGFile 123.png'
一:将出错的png,用PhotoShop重新转换一次, 如果PhotoShop打不开,改后缀为Jpg 试试. 转换时,请使用 :存储为Web或设备所使用的格式格式转换成 PNG-24这样的图片大小比较合适
3:
一:确定静态库中是否有自定义的类文件,如果一个也没有,就会出现这种错误,这也是为什么新建的静态库都包含一个默认的类.
4: _OBJC_CLASS_$_UIMainKpiXML", referenced from:
1:检测类文件是否已经指定了Project Target
2:检测类文件是否在Bulid Phases 中的 Compile
Source 是否包含了这个类文件
以上两步都检查完成以后,如果编译还报错误,请尝试彻底关闭XCode 再次编译试试.
5: for architecture armv7s
以下摘自: http://stackoverflow.com/questions/12570116/what-is-the-difference-between-arm7-and-arm7s
Yes you are right about armv7s is about the iPhone 5. Here some summary info I found on the web:
ARMv6 ISA (used by the ARM11 core in the iPhone 2G and iPhone 3G)
ARMv7 (used by modern ARM cores, iPhone 3GS, iPhone 4 and 4S)
ARMv7s (new A6 SoC for iPhone 5).
注:错误含义表示 指定的framework 不支持对 armv7s 的支持, 也就不支持搭载A6处理器的iPhone 5.
如果在编译framework或者静态库的工程中依旧编译时,可能是以下设置导致,设置为NO即可
6: Local declaration of '' hides instance variable
1:私有变量与属性变量同名所致
7:Instance variable '' accessed in class method
1:在静态方法不能使用到类的属性变量,否则就报上面的错误
8:ld: symbol(s) not found for architecture i386
1:里面意思说:"_stroyboard" 这个属性在目标类中 根本就没声明!
那就声明一下咯? 注:XCode4.5 会默认声明了,但是只是针对自定义类,系统类还没有. 所以,小心
@synthesize storyboard;
9:PerformSelector may cause a leak because its selector is unknown
通过如下代码解决产生的编译器警告
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
[self performSelector:nextView];
#pragma clang diagnostic pop
来源:(http://www.ooso.net/archives/620)
10:unable to open executable
1:检测同一个静态库或工程中是否有两个或以上的想同类文件存在
2:删除模拟器中的应用,删除DerivedData文件夹 重新启动XCode.
11: Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
不要在头文件声明变量命名是以new copy开头
参考:http://kongbei888.blog.163.com/blog/static/24326613201261902510652/
12:ld: file not found:
1:指向的静态库没有找到
14: _utf8_countTrailBytes
add library libicucore.dylib
15:Stray "@" in program
工程使用的编译器版本过低所致. 修改编译器版本至最新版本,如下图:
参考:http://stackoverflow.com/questions/12821938/stray-in-program-with-nsdictionary-definition
16.解决真机调试iPad
Air设备时的错误:architecture not supported的办法
1.将Build Settings 中Architectures ——> Valid Architectures的arm64删掉,只留armv7、armv7s2.同上,将Architectures ——>Architectures改为 $(ARHS_STANDARD)armv7,armv7s
3.把Build Active Architecture Only 改为NO
4.编译即可
17.编译时出现:Not supported ARM architecture
解决办法:在./configure
时加入 -D__ARM_ARCH_5TEJ__
另外一篇:Android常见错误分析
18.Couldn't register xxx.xx.xx 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.
每个在xcode下用ios模拟器做开发的开发者都应该会遇到过上面所示的错误,目前找到最行之有效的解决办法是重启手机。不行了也顺便把电脑重启下。 建议以后记得stop就行了 不要正运行着就直接卸载了程序
本文一直更新希望大家踊跃回复自己知道的常见error 来参与本文的更新^_^
相关文章推荐
- IOS常见错误分析解决(一直更新) 你值得收藏-综合贴
- IOS常见错误分析解决(一直更新) 你值得收藏-综合贴
- Android常见错误及解决办法(一直更新)
- Composer常见错误解决-值得收藏
- iOS开发常见错误及其解决方法(长期更新)
- iOS 常见错误以及错误分析解决
- iOS静态代码分析时常见错误及解决办法
- ios 常见错误及解决办法(不定时更新)
- ORACLE常见错误代码的分析与解决
- Xcode 8+ 上面iOS10+的错误、警告解决办法(持续更新)
- PHP从零单排(十六)PHP操作MySQL常见错误信息及分析 分类: 技巧总结 2014-05-03 11:34 139人阅读 评论(0) 收藏
- ORACLE常见错误代码的分析与解决(三)
- JPA系列--JPA部署阶段常见错误及解决方法(持续更新)
- ORACLE常见错误代码的分析与解决 ORACLE教程 教程作者:佚名 教程来源:不详 教程栏目:ORACLE教程
- ORACLE常见错误代码的分析与解决(二)
- ORACLE常见错误代码的分析与解决(三)
- ORACLE常见错误代码的分析与解决
- MySQL 常见错误分析与解决方法
- iOS常见错误(持续更新)
- ios 调试技巧收藏 一 解决EXC_BAD_ACCESS错误的一种方法--NSZombieEnabled