说明
使用 #import <xx/xx.h>
在代码中来导入某个.framework库,编译时却收到了如下错误:
Could not build module xxx
查阅很多资料,也试过很多办法, 都不能解决问题。 接下来就是各种尝试 :
尝试一
使用#import 'xxxx.h'
的方式,来替换 #import <xx/xx.h>
。 再次编译项目,还是报错。 但这次报的错误并非是Could not build module
, 而是另外一种错误 : 未找到 xx.h file not found
。 既然是头文件未找到,那检查一下framework的引入路径是否正确。
尝试二
在项目的Build Settings
中 找到 Framework Search Paths
项, 将framework 加入进来
可以接着尝试配置 Header Search