RN项目凡是看到 Can’t find variable: XXX
均是由于没有 从react-native 中导入 所引起的
比如:
你使用<Image/>
你必须在头部导入Image
import {
Platform,
StyleSheet,
Text,
View,
Image,
ImageRequireSource
} from 'react-native';
这样在使用<image /> 组件就不会报错了。
均是由于没有 从react-native 中导入 所引起的
比如:
你使用<Image/>
你必须在头部导入Image