1.问题背景描述:
reactNative 中编译项目时突然报错,具体如图:
2.问题原因:
在reactNative 写样式的时候 宽、高、padding等值不能是字符串,正如上图中黄色框中的‘heigth’XXX,下方是代码。
header: {
width: 66,
height: '24',
},
3.解决方案:
将样式中的值改成数字即可。
header: {
width: 66,
height: 24,
},