zoukankan      html  css  js  c++  java
  • IOS常见错误分析解决(一直更新) 你值得收藏-综合贴

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

    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或者静态库的project中依然编译时,可能是下面设置导致,设置为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:检測同一个静态库或project中是否有两个或以上的想同类文件存在

    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

    project使用的编译器版本号过低所致. 改动编译器版本号至最新版本号,例如以下图:


    參考: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、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  来參与本文的更新^_^


  • 相关阅读:
    WCF 4.0中的动态发现服务WSDiscovery
    Windows Server 2008 R2 Server Core
    Open Source Web Design
    Windows Identity Foundation(WIF)正式发布
    是开始学习IronPython 的时候了
    IronPython 承载和消费WCF服务
    微博客程序 Yonkly
    如何启用匿名访问SQL Server Reporting Service 2008
    ASP.NET MVC 2 RC 发布
    SharePoint 2010 VHD下载
  • 原文地址:https://www.cnblogs.com/zhchoutai/p/6851591.html
Copyright © 2011-2022 走看看