【发布时间】:2017-09-16 22:09:52
【问题描述】:
我正在尝试使用此库 react-native-vector-icons 在我的 react-native 应用程序中使用 FontAwesome 图标。我遵循了安装过程(npm install、link、更新我的 gradle.properties...)
然后在我的代码中我像这样导入图标:
const Icon = require('react-native-vector-icons/FontAwesome');
我在我的渲染方法中使用它:
<Button>
<Icon name='home' />
</Button>
不幸的是,在运行时,这会出现以下错误:
如何在我的 react-native 应用中使用 Fontawesome 图标?
感谢您的帮助
【问题讨论】: