Xcode Error Solutions

简介: Xcode Error Solutions ------------------------------------------------------------------------------------------------...

Xcode Error Solutions

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

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



----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





Objective-C Crash Solutions

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


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 复选框去掉就可以了
如图:

目录
相关文章
|
Java iOS开发
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
Mac编译OpenJDK8:configure: error: Xcode 4 is required to build JDK 8, the version found was 10.1config
93 0
|
iOS开发
未解决:configure: error: XCode tool ‘metal‘ neither found in path nor with xcrunchecking for metal...
未解决:configure: error: XCode tool ‘metal‘ neither found in path nor with xcrunchecking for metal...
122 0
|
iOS开发
XCode编译:pngcrush caught libpng error解决方法
XCode编译:pngcrush caught libpng error解决方法
103 0
XCode编译:pngcrush caught libpng error解决方法
XCode 7上传遇到ERROR ITMS-90535 Unexpected
<div id="article_content" class="article_content" style="margin:20px 0px 0px; font-size:14px; line-height:26px; font-family:Arial; color:rgb(51,51,51)"> <p>找到腾讯的info。plist</p> <p><br></p> <p></
991 0
|
2月前
|
Linux 数据安全/隐私保护 iOS开发
如何使用 Xcode 打包导出 IPA 文件并进行 iOS 应用内测,无需支付苹果开发者账号费用?
如何使用 Xcode 打包导出 IPA 文件并进行 iOS 应用内测,无需支付苹果开发者账号费用?
|
8月前
|
iOS开发
iOS Xcode 意外退出 打不开工程
iOS Xcode 意外退出 打不开工程
106 0
|
6月前
|
iOS开发 芯片 MacOS
[Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture...
[Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture...
123 0
|
6月前
|
iOS开发 开发者
Xcode7.2真机调试iOS 9.3的设备
Xcode7.2真机调试iOS 9.3的设备
108 0
|
9月前
|
iOS开发
Xcode 12.3 编译提示Building for iOS Simulator, but the linked and embedded framework
Xcode 12.3 编译提示Building for iOS Simulator, but the linked and embedded framework
|
11月前
|
Linux 数据安全/隐私保护 iOS开发
如何使用 Xcode 打包导出 IPA 文件并进行 iOS 应用内测,无需支付苹果开发者账号费用?
苹果开发者账号认证需要支付 688 元,对于初学 iOS 开发的同学来说,仅仅是为了进行内测而不需要上架 App Store,这样的费用是不必要的。