----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1: Xcode component installation Error-> An unknown error
occurred. See theinstall
log for more details.
Just double click Xcode 4.3.1 dmg file ... or Just go to the Applications folder and right click on Xcode.
Then window will show Xcode app.
Right Cick App
Show Package contents
Then go to /Contents/Resources/Packages/
Install That MobileDevice.pkg ...
After installation
Double click on Xcode app ...
Just See Xcode is ready ...
https://discussions.apple.com/thread/3863980?start=0&tstart=0
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Xcode
Building Error Solutions
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1:clang failed with exit code 1
一:检测所属工程文件中,所有的引用文件是否都已经正常引用了. 没有引用,请正确引用. 再次尝试编译
2:clang failed with exit code 254
一:检测代码中 是否 有 NSLog 打印了 返回 void 的值.
3:Verify exit code of build task with internal identifier 'CopyPNGFile 123.png'
一:将出错的png,用PhotoShop重新转换一次, 如果PhotoShop打不开,改后缀为Jpg 试试. 转换时,请使用 :存储为Web或设备所使用的格式格式转换成 PNG-24这样的图片大小比较合适
4:
一:确定静态库中是否有自定义的类文件,如果一个也没有,就会出现这种错误,这也是为什么新建的静态库都包含一个默认的类.
5: _OBJC_CLASS_$_UIMainKpiXML", referenced from:
1:检测类文件是否已经指定了Project Target
2:检测类文件是否在Bulid Phases 中的
Compile Source 是否包含了这个类文件
以上两步都检查完成以后,如果编译还报错误,请尝试彻底关闭XCode 再次编译试试.
6: 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即可
7: Local declaration of '' hides instance variable
1:私有变量与属性变量同名所致
8:Instance variable '' accessed in class method
1:在静态方法不能使用到类的属性变量,否则就报上面的错误
9:ld: symbol(s) not found for architecture i386
1:里面意思说:"_stroyboard" 这个属性在目标类中 根本就没声明!
那就声明一下咯? 注:XCode4.5 会默认声明了,但是只是针对自定义类,系统类还没有. 所以,小心
@synthesize storyboard;
10: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)
11:unable to open executable
1:检测同一个静态库或工程中是否有两个或以上的想同类文件存在
2:删除模拟器中的应用,删除DerivedData文件夹 重新启动XCode.
12: Property's synthesized getter follows Cocoa naming convention for returning 'owned' objects
不要在头文件声明变量命名是以new copy开头
参考:http://kongbei888.blog.163.com/blog/static/24326613201261902510652/
13: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
Build Url
1: exit code 254错误解决方法 iOS 5 - Apple LLVM compiler 3.0 error
http://www.cnblogs.com/mfryf/archive/2012/02/26/2369190.html
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1:不要让0参与除法
Crash异常错误如下:
2012-07-10 13:31:59.471 FeOAClient[2155:15b03] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 3]' *** First throw call stack: (0x3889022 0x3a1acd6 0x3831a48 0x38319b9 0xc94c0d 0xc8af55 0xc8aa0a 0x10f1fb8 0xfce8a 0x10f89d4 0x10f8b11 0xfcb6c 0x37ef4ed 0x37ef407 0x381a46a 0xc09db 0x37ef4ed 0x37ef407 0x388ae42 0xd869df 0x385d94f 0x37c0b43 0x37c0424 0x37bfd84 0x37bfc9b 0x40a57d8 0x40a588a 0x10be626 0x350d 0x2485) terminate called throwing an exception(lldb)
解决办法:
检查代码 是否有0 参与的除法的计算,主要常见原因:
以下摘自:Minroad
1.除以0
2.sizeWithFont的字符串为nil
3.数学函数不正确运算
解决方法除了排除根源所在之外,用函数isnan()也是不错的选择(至少在没有彻底解决以前)
如下:
float _x = NAN; if (!isnan(_x)) { cell.imgView.frame = CGRectMake(_x, 8, 10, 12); }
2: Could not instantiate class named NSLayoutConstraint (Could not instantiate class named NSLayoutConstraint )
由于iOS 6 提供XIB 自动布局功能,那么在iOS 5上面使用肯定是不行的. 那么为了兼容iOS 5,目前只有将iOS 6的自动布局去掉先吧
再最右边的
inspector 一栏 将 interface builder document下的use autolayout 复选框去掉就可以了
如图: