RN自用踩坑记录

2019-10-25  本文已影响0人  zheng65312

1.RN学习-Xcode升级ios模拟器无法启动问题,react-native run-ios --simulator --no-packager --verbose 时出错(error code 101)

RN学习踩坑记录:

编译工具:vsCode(Visual Studio Code)
xcode版本:11.1(升级后)
RN版本:0.61.2

编译之前一直正常。Xcode升级后ios模拟器启动不了报错如下: 3F825EF6D2210BC8AC85636A391C8485.png

各种百度 得出结论说配置指引错误,

然后查文件
发现我工程就没有上面所说的路径,


FA3A3318-59CB-4C5C-BA4F-1DBE8F73CF3F.png

然后翻墙google




最后还是群里小伙伴提醒了下

解决方法:xcode 升级以后需要打开软件 isntall安装,关联一下之前的配置

蛋疼了一天终于解决了
-xcode 升级后 双击打开xcode 然后会出现弹窗 选导入
-然后把项目中 node_modules文件删掉 重新npm install 一下
就OK了

2. The <Image> component cannot contain children. If you want to render content on top of the image, consider using absolute positioning

<Image source={bgImage} style={styles.backgroundContainer}> 
    <View style={styles.container}>
        <Quote quoteText={this.props.text} quoteSource={this.props.source}/>
    </View>
</Image>

解决方式。 Image 改为 ImageBackground

上一篇 下一篇

猜你喜欢

热点阅读