我已将我的应用程序升级到 RN 版本 0.60.5 并使用 react-native-vector-icons/Feather
作为图标。升级前图标显示良好,但升级后我看到的是方 block 而不是图标:
我是这样使用的:
import Icon from 'react-native-vector-icons/Feather';
.
.
.
return (
<TouchableOpacity onPress={() => this.btnPressed('Discover')} style={[styles.btn, { marginLeft: 20 }]}>
<Icon name={'compass'} color={this.state.discoverSelected ? this.props.activeTintColor : this.props.inactiveTintColor} size={24} />
<Text style={[styles.btnTxt, { color: this.state.discoverSelected ? this.props.activeTintColor : this.props.inactiveTintColor }]}>Discover</Text>
</TouchableOpacity>
)
这可能是什么原因?
最佳答案
我之前遇到过同样的问题,按照官方安装文档解决了 通过使用 option-with-cocoapods对于 ios 和 option-with-gradle安卓
关于android - react-native-vector-icons/羽毛图标不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57833937/