react-native 报错 RawText "" must be wrapped in an explicit <Text> component
2017-08-21 11:57
357 查看
刚才又遇到了一个坑,找了好久,问题如下:
开始以为是Text标签怎么有问题了,结果是下面的原因影响的:
上图第二行,标签和注释中间多了一个空格,就会报这个错误。
解决办法
1.将空格删掉
<RefText ref="reftext"/>{/* <RefText...*/}
2.换行
<RefText ref="reftext"/> {/* <RefText...*/}
It works!
相关文章推荐
- React Native error: Raw “ ” must be wrapped in an explicit <Text> Component
- RN开发中报错:Invariant Violation:RawText " " must be wrapped in an explicit <Text> component 原因分析
- RawText "123" must be wrapped in an explicit <Text> component
- Error RawText ** must be wrapped in an explicit <Text> component 问题解决
- Fixing the "There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework
- react-native学习笔记之<TextInput>
- 调试记录:The public type <<classname>> must be defined in its own file
- 调试记录:The public type <<classname>> must be defined in its own file
- Element type "EditText" must be followed by either attribute specifications, ">" or "/>".
- Deprecated</b>: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a
- Element type "EditText" must be followed by either attribute specifications, ">" or "/>".
- 解决"There is already an open DataReader associated with this Command which must be closed first." exception in EF 中
- There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework
- MATLAB7.0安装后显示The element type "name" must be terminated by the matching end-tag "</name>".
- 解决:Did not expect server HTML to contain the text node " " in <div>.
- MATLAB7.0安装后显示The element type "name" must be terminated by the matching end-tag "</name>".
- Magento安装出现<PHP Extension "curl" must be loaded>解决方法
- react-native中debug报错信息:Each child in an array or iterator should have a unique "key" prop.
- Adjacent JSX elements must be wrapped in an enclosing tag
- 安卓开发——报错:You must specifiy a layout in the include tag: <include layout="@layout/layoutID" />