I have tried everything but cannot resolve this error. Please Help to replace this box instead of icon import { Icon } from 'react-native-elements'
<Icon name="glass" ></Icon>
You could try like this:
import FontAwesome from "react-native-vector-icons/FontAwesome";
...
<FontAwesome
name={"glass"}
size={30}
color="#000000"
/>
If you want to use react-native-elements you should try to use it with props type , like this:
<Icon
name='glass'
type='font-awesome'
onPress={() => console.log('hello')}
/>
If the icon is still not displayed you have to try this:
react-native link
As mentioned here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.