【发布时间】:2019-09-07 13:03:07
【问题描述】:
我已将我的应用程序升级到 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>
)
这可能是什么原因?
【问题讨论】:
-
你试过
react-native link吗? -
是的@AbdumutalAbdusamatov
标签: android reactjs react-native react-native-vector-icons