我已将我的应用升级到RN版本0.60.5,并使用react-native-vector-icons/Feather
作为图标。升级之前,图标显示良好,但之后我看到的是正方形而不是图标:
我这样使用它:
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>
)
这可能是什么原因?
答案 0 :(得分:0)
我之前遇到过同样的问题,可以通过遵循官方的安装文档来解决 通过使用 option-with-cocoapods for ios 和 option-with-gradle for android