ios开发常见错误

-来自收藏总结 综合了好多的常见错误ios

1:clang failed with exit code 254web

一:检测代码中 是否 有 NSLog 打印了 返回 void 的值.bootstrap

 

2:Verify exit code of build task with internal identifier 'CopyPNGFile 123.png'xcode

加载中...\

一:将出错的png,用PhotoShZ喎�"http://www.2cto.com/kf/ware/vc/" target="_blank" class="keylink">vcNbY0MLXqru70ru0ziwgIMjnuftQaG90b1Nob3C08rK7v6osuMS689e6zqpKcGcgytTK1C4g16q7u8qxLMfryrnTwyA6PHN0cm9uZz605rSizqpXZWK78snosbjL+cq508O1xCYjMjY2ODQ7yr08L3N0cm9uZz4mIzI2Njg0O8q916q7u7PJPHN0cm9uZz4gUE5HLTI0PC9zdHJvbmc+1eLR+bXEzbzGrLTz0KGxyL3Pus/KyjwvcD4KPHA+Cjxicj4KPC9wPgo8cD4KPHN0cm9uZz4zOjwvc3Ryb25nPjwvcD4KPHA+CjxpbWcgc3JjPQ=="http://www.2cto.com/uploadfile/2014/0509/20140509112551421.png" alt="\">\ide

一:肯定静态库中是否有自定义的类文件,若是一个也没有,就会出现这种错误,这也是为何新建的静态库都包含一个默认的类.ui

4: _OBJC_CLASS_$_UIMainKpiXML", referenced from:this

1:检测类文件是否已经指定了Project Target .net

加载中...\

2:检测类文件是否在Bulid Phases 中的 Compile Source 是否包含了这个类文件debug

加载中...\

以上两步都检查完成之后,若是编译还报错误,请尝试完全关闭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 会默认声明了,可是只是针对自定义类,系统类尚未. 因此,当心

       


      1. @synthesize storyboard;  

        9:PerformSelector may cause a leak because its selector is unknown 

        经过以下代码解决产生的编译器警告

         

         


        1. #pragma clang diagnostic push
        2. #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
        3. [self performSelector:nextView]; 
        4. #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删掉,只留armv七、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就好了 不要正运行着就直接卸载了程序不知道各位有什么好的办法分享下。或者是否知道形成这种状况的缘由。

相关文章
相关标签/搜索