1.'config.h' file not found
屏幕快照 2018-11-06 下午2.20.26.png解决方案:
cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh
cd ../../../../
sh script/xcode10.sh
输入上面四个命令
clean the project and build again, the error is gone
其实执行 .sh 命令之后Terminal界面的一些处理流程,我们不难看出,这个命令是check .h头文件的引用情况,然后建立关联关系
如果输入以上命令 还是报错 如下图
屏幕快照 2019-07-24 下午1.54.49.png
以上问题出现在Xcode 项目build的过程中,错误提示Xcode路径定位错误,那就通过命令行重新指定Xcode路径,网上有人说是安装过多个Xcode版本的缘故
解决方案:终端运行:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
然后再运行
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:
屏幕快照 2018-11-15 上午10.40.07.png
解决方案 :
在命令行执行:
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json
3.No bundle URL present
屏幕快照 2018-11-28 上午10.46.55.png解决方案:运行以下两个命令
npm install
react-native run-ios
4 .运行中如果碰到 报 react-native-vector-icons 相关的文件错误找不到 如下图所示在命令行执行:
rm ./node_modules/react-native/local-cli/core/__fixtures__/files/package.json
网友评论