1.'config.h' file not found
解決方案:
cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh
cd ../../../../
sh script/xcode10.sh
輸入上面四個(gè)命令
clean the project and build again, the error is gone
其實(shí)執(zhí)行 .sh 命令之后Terminal界面的一些處理流程奢驯,我們不難看出,這個(gè)命令是check .h頭文件的引用情況,然后建立關(guān)聯(lián)關(guān)系
如果輸入以上命令 還是報(bào)錯(cuò) 如下圖
以上問(wèn)題出現(xiàn)在Xcode 項(xiàng)目build的過(guò)程中,錯(cuò)誤提示Xcode路徑定位錯(cuò)誤,那就通過(guò)命令行重新指定Xcode路徑,網(wǎng)上有人說(shuō)是安裝過(guò)多個(gè)Xcode版本的緣故
解決方案:終端運(yùn)行:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
然后再運(yùn)行
cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh
2 error: bundling failed: Error: While resolving module
react-native-vector-icons/MaterialIcons,
error: bundling failed: Error: While resolving module `react-native-vector-icons/MaterialIcons`, the Haste package `react-native-vector-icons` was found. However the module `MaterialIcons` could not be found within the package. Indeed, none of these files exist:
解決方案 :
在命令行執(zhí)行:
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json
3.No bundle URL present
解決方案:運(yùn)行以下兩個(gè)命令
npm install
react-native run-ios
4 .運(yùn)行中如果碰到 報(bào) react-native-vector-icons 相關(guān)的文件錯(cuò)誤找不到 如下圖所示在命令行執(zhí)行:
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json