工程中报错或者警告一些情况及解决办法。例如:does not contain bitcode. You must rebuild it with bitcode enabled

时间:2021-02-25 14:47:37

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。

解决办法:

工程中报错或者警告一些情况及解决办法。例如:does not contain bitcode. You must rebuild it with bitcode enabled

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类文件,没有引用上;

解决办法:

工程中报错或者警告一些情况及解决办法。例如:does not contain bitcode. You must rebuild it with bitcode enabled

工程中报错或者警告一些情况及解决办法。例如:does not contain bitcode. You must rebuild it with bitcode enabled


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.

解决办法:

工程中报错或者警告一些情况及解决办法。例如:does not contain bitcode. You must rebuild it with bitcode enabled


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;