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

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

解决办法





已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 成长之路 设计师:Amelia_0503 返回首页