xxxxxxxxxx
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>Octicons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Zocial.ttf</string>
</array>
xxxxxxxxxx
add this in '/app/build.gradle'
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
xxxxxxxxxx
react-native link react-native-vector-icons
react-native run-android
xxxxxxxxxx
import Icon from 'react-native-vector-icons/FontAwesome';
const myIcon = <Icon name="rocket" size={30} color="#900" />;
xxxxxxxxxx
project.ext.vectoricons = [
iconFontNames: [ 'MaterialIcons.ttf', 'FontAwesome.ttf', 'MaterialCommunityIcons.ttf', 'Ionicons.ttf'] // Name of the font files you want to copy
]
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
xxxxxxxxxx
import React from 'react';
import { View, Text } from 'react-native';
import Icon from 'react-native-vector-icons';
const IconDirectory = () => {
// Fetch the icon names available in the library
const iconNames = Icon.getIconNames();
return (
<View>
<Text>Icon Directory:</Text>
{
iconNames.map((iconName, index) => (
<View key={index}>
<Icon name={iconName} size={20} />
<Text>{iconName}</Text>
</View>
))
}
</View>
);
};
export default IconDirectory;
xxxxxxxxxx
module.exports = {
dependencies: {
'react-native-vector-icons': {
platforms: {
ios: null,
},
},
},
};
xxxxxxxxxx
apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
xxxxxxxxxx
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"