Icons not showing in React Native JS.
I check all of the codes but I can’t find any problem.
When I run it in Android, the Icon not showing
Please help me to find the problems so the Icon can showing in my Android 🙂
import {StyleSheet, Text, View, TouchableOpacity} from 'react-native';
import React, {useEffect, useState} from 'react';
import {Icon} from 'react-native-elements';
const ContactListScreen = (props) => {
return (
<View style={styles.buttonView}>
<TouchableOpacity
style={styles.addButton}>
<Icon name="plus" type="antdesign" size={24} color="black" />
</TouchableOpacity>
</View>
);
};
export default ContactListScreen;
2
Answers
Chessy.
I think there are some errors in your code.
There’s no render() method in your jsx/js file.
If this is not problem, then please read below once.
There are a few potential reasons why the icons may not be showing in your React Native app on Android. Here are some troubleshooting steps you can try:
By following these steps, you should be able to identify and resolve the issue causing the icons to not show up in your React Native app on Android.
Hope this would help you.
David.
for icons react-native-elements depend on a library react-native-vector-icons
you have to follow the installation guide for react native vector icons mentioned in the documentation