第一步: 进入项目目录,输入:
//glog-0.3.4要根据目录自己的而定
cd node_modules/react-native/third-party/glog-0.3.4
第二步: 执行:
../../scripts/ios-configure-glog.sh
执行完,上个命令如果遇到以下错误:
configure: error: in /Users/macmini1/Downloads/react-native-youtube-master/example/node_modules/react-native/third-party/glog-0.3.4’: configure: error: C compiler cannot create executables See config.log’ for more details
解决办法: 在当前目录执行下面的命令:
./configure --host arm-apple-darwin
当我们使用Xcode10 编译运行之前的RN项目时,报如下错误时:
error:Build input file cannot be found:’/Users/…/Libraries/WebSocket/libfishhook.a’
报这种错误说明在node_modules中没有找到对应的libfishhook.a库,说明该库的文件路径可能发生了变化导致。解决办法:
最后,Clean,使用Xcode build项目。