在有些版本的react ntive下面,当运行npm install
之后准备运行iOS工程的时候,可能会遇到一下两种编译错误:
'config.h' file not found
'glog/logging.h' file not found
这两个错误都是和react native 中的glog文件有关,原因可能是没有配置完全。
解决办法的完整流程是:
-
cd
到node_modules/react-native
下面,如果没有发现third-party
目录。就运行./scripts/ios-install-third-party.sh
, 安装第三方库。 -
third-party
存在的情况下,cd
到./third-party/glog-0.3.5
目录下,运行../../scripts/ios-configure-glog.sh
如此之后,你就能在glog-0.3.5
目录下面发现config.h
和 logging.h
文件了。
网友评论