react-native run-android 時而账,報如下錯誤:
error: bundling failed: Error: While resolving module `react-native-vector-icons/MaterialIcons`, the Haste package `react-native-vector-icons` was found. However the module `MaterialIcons` could not be found within the package. Indeed, none of these files exist:
* `/Users/user/my-app/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
* `/Users/user/my-app/node_modules/react-native/local-cli/core/__fixtures__/files/MaterialIcons/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)`
google了下,在https://github.com/oblador/react-native-vector-icons/issues/626找到了沾乘。
原因可能是React-Native福贞,React何乎,React-native-vector-icons的版本問題较屿。
解決方法:刪除這個文件,刪前記得備份。
./node_modules/react-native/local-cli/core/__fixtures__/files/package.json
轉(zhuǎn)載http://blog.csdn.net/klo220/article/details/79060428