xcode 9 常见报错的解决方法

1._OBJC_CLASS_$_某文件名", referenced from:

这个报错是缺少静态库文件,点击左下角的+ 导入这3个静态库


xcode 9 常见报错的解决方法

2.“Lexical or Preprocessor Issue ‘*.h’ file not found”

这个报错大部分是接sdk,导入sdk的资源 import xx.h 头文件报错,确认sdk的xxx.framework是否在上图里面,如果没有说明没有导入好,add资源到xcode必须根据sdk的需求来,通常是勾选 create groups导入

xcode 9 常见报错的解决方法

如果有则需要把import xx.h 删除,重新导入sdk库资源确认导入后再使用

3.clang: error: no such file or directory: '-ObjC'  这个是  - 是中文的 -修改下即可

4.-fembed-bitcode is not supported on versions of iOS prior to 6.0

如图所示 把enale bitcode 选项改为no

xcode 9 常见报错的解决方法

暂时发现这些往后有新的报错会持续更新,ps:以上报错并不一定适用所有xcode版本。