我已将我的应用程序升级到 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>
)
这可能是什么原因?