工程中報錯或者警告(持續更新)(例如:does not contain bitcode. You must rebuild it with bitcode enabled )

ZFJ_張福傑發表於2016-01-26

1.問題描述

ld: '/Users/zfj_apple/Desktop/EaseMobDemo/EaseMobSDK/lib/libEaseMobClientSDK.a(easemobvideo.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

錯誤解析:你新增的SDK(例如:友盟、環信)的二進位制庫不支援bitcode,但是Xcode預設是支援bitcode的,而且如果支援的話,其中所有的二進位制庫和framework都必須包含bitcode。

解決辦法:


2.問題描述:

Warning: Multiple build commands for output file /Users/zfj_apple/Library/Developer/Xcode/DerivedData/CosFundLife-factdirmepkoabctyvlrqnaectpn/Build/Products/Debug-iphonesimulator/CosFundLife.app/bottom@2x.png

錯誤解析:工程中有重複引用的檔案;

解決辦法:刪除重複的檔案;


3.問題描述:

Undefined symbols for architecture x86_64:

  "_OBJC_CLASS_$_LifeHomeModel", referenced from:

      objc-class-ref in TCLifeViewController.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

錯誤解析:找不到這個LifeHomeModel類檔案,沒有引用上;

解決辦法:




4.問題描述:

ld: warning: directory not found for option '-F/Users/zfj_apple/Desktop/CosFundLifeNew/CosFundLife/TCThirdPartySDK/OneApm'

解決辦法:

選擇工程, 編譯的 (targets)
選擇 Build Settings 選單
查詢 Library Search Paths 和 Framework Search Paths, 刪掉編譯報warning的路徑即OK

5.問題描述:

Unsupported Configuration: This file is set to build for a version older than the deployment target. Functionality may be limited.

解決辦法:



6.問題描述:

warning: could not load any Objective-C class information. This will significantly reduce the quality of type information available.

- (void)setText:(NSString *)text{

   self.text = text;

   self.nameLabel.text = text;

}

解決辦法:這是因為self導致了無限迴圈,改為_text = text;


7.問題描述

Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Cache

解決辦法:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;

這個方法的返回物件為nil了,不能為空。


8.問題描述

wait_fences: failed to receive reply: 10004003

解決辦法:

在使用UIAlertView的時候出現這個錯誤的時候是因為你沒有收起鍵盤,因為鍵盤沒有關閉,UIAlertView就失去焦點,可以在此收起鍵盤;

[self.viewendEditing:YES];


9.問題描述

Collection <__NSArrayM: 0xb550c30> was mutated while being enumerated.

解決辦法:

這是因為你在遍歷陣列的時候,又對陣列進行修改造成的;


10.問題描述

hpricot_scan.bundle: dlopen no suitable image found. Did find: (LoadError)

詳情:

Error loading /var/mobile/Containers/Data/Application/284CE583-E406-436B-9ADD-7F2C4AC36AA3/Documents/FunctionZFJ1/FunctionZFJ1.framework/FunctionZFJ1:  dlopen(/var/mobile/Containers/Data/Application/284CE583-E406-436B-9ADD-7F2C4AC36AA3/Documents/FunctionZFJ1/FunctionZFJ1.framework/FunctionZFJ1, 265): no suitable image found.  Did find:

/var/mobile/Containers/Data/Application/284CE583-E406-436B-9ADD-7F2C4AC36AA3/Documents/FunctionZFJ1/FunctionZFJ1.framework/FunctionZFJ1: mmap() errno=1 validating first page of '/var/mobile/Containers/Data/Application/284CE583-E406-436B-9ADD-7F2C4AC36AA3/Documents/FunctionZFJ1/FunctionZFJ1.framework/FunctionZFJ1'

解決辦法:

你解析的bundle的版本不支援當前手機的系統版本;


11.問題描述

Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:]

解決辦法:

UIViewController *emptyView = [[ UIViewController alloc ]initNibName:nil bundle:nil ];
self. window .rootViewController = emptyView;


12.問題描述

 Implicit declaration of function 'objc_setAssociatedObject'

解決辦法:

匯入標頭檔案:#import <objc/runtime.h>


13.問題描述

 Implicit declaration of function 'objc_setAssociatedObject' is invalid in C99

解決辦法

一般出現該問題是因為通過C呼叫了unix/linux 底層介面,所以需要調整c語言的編譯選項,如下圖:



14.問題描述

User-facing text should use localized string macro

解決辦法





相關文章