1. error: bundling failed: Error: While resolving module react-native-vector-icons/Ionicons
, the Haste package react-native-vector-icons
was found. However the module Ionicons
could not be found within the package. Indeed, none of these files exist:
解决方案:删除./node_modules/react-native/local-cli/core/fixtures/files/package.json的package.json这个文件(自己可先保留一份)
2.遇见变量未定义的情况
**方法1.首先要在构造函数里面进行初始化定义,因为RN首先会加载构造器里面的内容。
方法2.将变量对应的函数进行绑定