2

我已将我的应用程序升级到 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>
)

这可能是什么原因?

4

1 回答 1

1

我之前遇到过同样的问题,我按照官方安装文档解决了这个问题,使用 ios 的 option-with-cocoapods和android的 option-with-gradle

于 2019-09-08T06:22:27.947 回答