在我通过expo-cli
创建好了一个expo应用后,通过expo start
进行运行时是完全没问题的,但是在我通过yarn add @ant-design/react-native
安装了ant-design依赖后,在通过import { Carousel } from '@ant-design/react-native'
引入ant-design 想要使用其中的Carouse组件时,它报了该错误:Unable to resolve module @react-native-community/async-storage from D:\lianxi\myapp2\myapp2\node_modules\@bang88\react-native-ultimate-listview\src\refreshableScrollView.android.js: @react-native-community/async-storage
最终发现原来除了要安装@ant-design/react-native
还需要安装@react-native-community/async-storage
依赖,该依赖官网没说要安装。。。
执行yarn add @react-native-community/async-storage
进行安装即可
安装完成后再运行就行了,至于Ant Design Mobile RN of React官网中的链接字体图标react-native link @ant-design/icons-react-native
个人感觉没有啥用