ReactNative踩坑记录

1、安装了AS,安装了jdk,安装了GenymotionShell后,利用react-native-cli创建了一个项目,启动就是失败。

最后通过百度,google,找到了问题,java10不支持,换了个版本,成功。

2、按照官网demo敲例子,报错:Cannot add a child that doesn’t have a YogaNode or parent node 

该错误一般是因为render方法中注释语句写法不正确,render的return函数里面的注释语句应该写在 {} 里面,而不是直接 //,正确写法:{/*注释语句 */}

猜你喜欢

转载自blog.csdn.net/qq_30114149/article/details/79795755