xcode編譯錯誤總結

  1. No architectures to compile for(ONLY_ACTIVE_ARCH=YES   

       這種錯誤    修改building settings下 Build Active Architecture only 爲NO便可。
  2. dyld: Symbol not found: _objc_setProperty_nonatomic    

      _objc_setProperty_nonatomic是ios6.0的新方法,三方庫設置了Deployment Target 爲6.0就會調用這2個新增的方法,爲ios5中沒有,咱們的項目是支持ios5的。因此報錯。把lib的target設置爲5.0以後,沒有這個錯誤了ios

           若是你在使用新浪sdk,使用了libWeiboSDK_X64的庫,若是在5.x上運行,也會報這個錯,猜想這個版本的庫時6.x如下的。換成那個不帶_X64的庫,沒有問題。c++

    1. 在使用百度統計是,若是出現相似錯誤

      在buildPhases 下添加coreTelephoney.framework便可

      這個問題,花費了我2天的時間才找到,總覺得是自制的靜態庫的問題。

    2. no provisioning profile at path '/Users/user/Library/MobileDevice/Provisioning Profiles/XXXXX.XXX
       當報這種錯誤時,工程證書不正確,修改build setting下 的Provisioning Profile爲正確的的項目證書便可
    3. malformed or corrupted AST file: iosXXX,相似的錯誤時,時xcode編譯器的問題,清理下/Library/Developer/Xcode/DerivedData下的數據
      便可。
    4.  

      Assertion failure in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:], /SourceCache/UIKit_Sim/UIKit-2903.23/UITableViewRowData.m:578xcode

      libc++abi.dylib: terminate_handler unexpectedly threw an exceptionapp

      這個錯誤的緣由是在計算tableview的高度是出錯,ui

      對現實的圖片UIImage計算高度,可是此時image爲nil,作了200/image.size.height這個操做atom

      致使height += 200/image.size.height,這個計算後,height爲NaN,以後報這個錯誤,code

       

       

      keychain錯誤:Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't add the Keychain Item.'orm

       

       KeyChain內部以kSecAttrAccount 與kSecAttrService做爲惟一鑰匙串標識,圖片

      傳送門 http://stackoverflow.com/questions/4891562/ios-keychain-services-only-specific-values-allowed-for-ksecattrgeneric-keyci

相關文章
相關標籤/搜索