'config.h' file not found'和/Libraries/WebSocket/libfishhook.a'-Xcode10,React-Native更新问题

1.React Native 中在xcode10运行提示 ‘config.h’ file not found’

在这里插入图片描述
解决方法:
在项目终端执行以下命令

cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh

clean the project and build again, the error is gone,也可以参见github中的处理意见:config.h’ file not found
其实执行 .sh 命令之后Terminal界面的一些处理流程,我们不难看出,这个命令是check .h头文件的引用情况,然后重新建立关联关系

2.Build input file cannot be found: ‘…/node_modules/react-native/Libraries/WebSocket/libfishhook.a’

解决方案:
按照1-2-3步骤进行先删除掉libfishhook.a文件,然后再重新加入即可
在这里插入图片描述

3.Xcode10构建方式切换,使用旧的构建方式

由于Xcode10会默认使用新的构建方式,感觉不是很顺手,于是我们需要切换到旧的构建方式,构建方式如下:
File->Project Settings->Build Systems 选择Legacy Build System
在这里插入图片描述

4.Could not find iPhone 6 simulator

在升级完系统之后,使用react-native run-ios命令进行打开模拟器时,会提示该Could not find iPhone 6 simulator

react: 16.0.0 => 16.0.0
react-native: 0.51.0 => 0.51.0
Xcode: Xcode 11.2 Build version 11B52

解决方案:
1.进入打开findMatchingSimulator文件

cd ./node_modules/react-native/local-cli/runIOS

打开文件findMatchingSimulator.js,然后替换内容。
第一步替换:

    if (version.indexOf('iOS') !== 0) {
       continue;
     }

    if (!version.includes('iOS')) {
      continue;
    }

第二步替换:

      if (simulator.availability !== '(available)') {
        continue;
      }

      if (simulator.isAvailable !== true) {
        continue;
      }

替换之后,重新运行react-native run-ios即可正常运行


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

suwu150

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值