我在snack expo中使用fontawsome图标构建了布局,但是当在expo cli中运行相同的项目时,图标不显示。它显示为一个交叉。应用程序在snack中完美运行,但在expo cli中没有。我试过用谷歌搜索problelem但是解决方案是 gradle 中的更改文件,我没有 gardle 文件,这是一个小吃项目。有任何解决方案,任何帮助都会非常好,谢谢。
import Icon from 'react-native-vector-icons/FontAwesome';
{
Home: {
screen: FetchNewsApp,
navigationOptions: {
tabBarLabel: 'Home',
tabBarIcon: ({ tintColor }) => (
<Icon name="home" color={tintColor} size={25} />
),
},
},
Explore: {
screen: ExploreScreenApp,
navigationOptions: {
tabBarLabel: 'Explore',
tabBarIcon: ({ tintColor }) => (
<Icon name="wpexplorer" color={tintColor} size={25} />
),
},
},
Search: {
screen: SearchScreenApp,
navigationOptions: {
tabBarLabel: 'Search',
tabBarIcon: ({ tintColor }) => (
<Icon name="search" color={tintColor} size={25} />
),
},
},
Settings: {
screen: SettingScreenApp,
navigationOptions: {
tabBarLabel: 'Settings',
tabBarIcon: ({ tintColor }) => (
<Icon name="cog" color={tintColor} size={25} />
),
},
},
Profile: {
screen: ProfileScreenApp,
navigationOptions: {
tabBarLabel: 'Profile',
tabBarIcon: ({ tintColor }) => (
<Icon name="user-circle" color={tintColor} size={25} />
),
},
},
},
{
initialRouteName: 'Home',
}
);