1.在根目录执行
npm install react-native-vector-icons --save
或者:
yarn add react-native-vector-icons --save
2.自动关联
react-native 版本大于0.30时可使用
react-native link; //自动关联
//手动关联可查阅
https://www.npmjs.com/package/react-native-vector-icons
3.引用
import Icon from 'react-native-vector-icons/FontAwesome';
4.报错
可修改项目权限,勾去只读选项
重新执行react-native run-android