电脑升级了最新的 macOS Mojave 和最新的 XCode 10,升级之后解决出现以前旧版本的RN项目打不开。
解决方法去搜索了对应的issues,比较杂乱,整理如下:
修复步骤如下:
- 首先是重新配置一下 glog 这个库:
rm -rf node_modules/ && yarn cache clean && yarn install 删除旧版本 node_modules 清理后重新安装 cd node_modules/react-native/scripts/ 进入scripts文件夹 ./ios-install-third-party.sh 安装@node_node_modules/react-native/third-party cd ../third-party/glog-0.3.x 进入你glog对应版本对文件夹 ./configure 运行该/configure脚本
之后执行 返回目录执行 $ react-native run-ios就可以了,如果不行可以尝试第二步:
-
删除库libfishhook.a并再次添加,然后再重新跑项目就可以了。