IOS常見錯誤分析解決(一直更新) 你值得收藏-綜合貼

來源:互聯網
上載者:User

-來自收藏總結 綜合了好多的常見錯誤

1:clang failed with exit code 254

一:檢測代碼中 是否 有 NSLog 列印了 返回 void 的值.


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


一:將出錯的png,用PhotoShZ喎?http://www.bkjia.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="\">

一:確定靜態庫中是否有自訂的類檔案,如果一個也沒有,就會出現這種錯誤,這也是為什麼建立的靜態庫都包含一個預設的類.

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 會預設聲明了,但是只是針對自訂類,系統類別還沒有. 所以,小心


    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刪掉,只留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 來參與本文的更新^_^


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.