- Warning: Failed child context type: Invalid child context
virtualizedCell.cellKey
of typenumber
supplied toCellRenderer
, expectedstring
.
in CellRenderer (at VirtualizedList.js:851)
in RCTView (at ScrollView.js:1063)
解决方法:
将keyExtractor = (item, index) => index转为keyExtractor = {(item, index) => index.toString()}
![](https://img.haomeiwen.com/i10953087/2b9f0420c4c34265.png)
- 问题:
Image的!!!重大变革:
Error: The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.
解决办法:
用ImageBackground 代替 Image
-问题:
Text strings must be rendered within a <Text> component.
原因:是因为多了两个‘’
![](https://img.haomeiwen.com/i10953087/821fab64b53a7d89.png)
解决办法:
去掉就可以了!!坑啊
![](https://img.haomeiwen.com/i10953087/2a343a9c9438cc15.png)
- 问题:
黄色警告
例如:Remote debugger is in a background tab which may cause apps to perform slowly. Fix this by foregrounding the tab (or opening it in a separate window).
解决办法:
去掉黄色警告:
在index.js 添加
console.ignoredYellowBox = ['Warning: BackAndroid is deprecated. Please use BackHandler instead.','source.uri should not be an empty string','Invalid props.style key'];
console.disableYellowBox = true // 关闭全部黄色警告
-
问题:
Native module cannot be bull.
问题
解决办法:
相关包内容没有安装好,重新安装
网友评论