第一步: 進入項目目錄,輸入:
//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項目。