美文网首页
运行React-native Could not find "i

运行React-native Could not find "i

作者: 堇之 | 来源:发表于2020-01-14 17:35 被阅读0次

        最近使用VSCode运行react-native项目的,运行iOS的时候,显示Could not find "iPhone X" simulator,或者error code 101。网上提供了替换findMatchingSimulator.js中的if (!version.startsWith('iOS') && !version.startsWith('tvOS'))的形式来解决。但是,我在findMatchingSimulator.js没有找到该方法,所以这个方法不可行。

        这边提供一个简单的方法,即直接把iPhone X添加进去。

        1、首先直接用xcode运行项目,或者使用命令运行项目。

        2、选中模拟器 - Hardware - Device - Manage Devices - 添加 iPhone X 设备

        这时候再运行,就能找到 iPhone X 了

相关文章

网友评论

      本文标题:运行React-native Could not find "i

      本文链接:https://www.haomeiwen.com/subject/znuaactx.html