oblador / react-native-vector-icons

Customizable Icons for React Native with support for image source and full styling.
https://oblador.github.io/react-native-vector-icons/
MIT License
17.31k stars 2.12k forks source link

Wrong Icons Showing #1602

Closed ColtraneNadler closed 6 days ago

ColtraneNadler commented 3 months ago

Environment

IOS

Description

Wrong icon is displayed, or not at all.

import Icon from 'react-native-vector-icons/MaterialIcons'

const Component = () => (<View> 
     <Icon name="play-arrow" color="#000" />
</View>

this displays 94c8f7a6bdc15f72db990a350c5ed6ea (1)

I have tried reinstalling. Cleaning build folder.


    "react": "18.2.0",
    "react-native": "0.73.5",
    "react-native-safe-area-context": "^4.9.0",
    "react-native-screens": "^3.29.0",
    "react-native-sound": "^0.11.2",
    "react-native-vector-icons": "^10.0.3"
alordiel commented 3 months ago

I had something similar. I had to check my /android/app/build.gradle : and look into the end of the file:

project.ext.vectoricons = [
    iconFontNames: [ 'MaterialCommunityIcons.ttf' ]
]
apply from:file("../../node_modules/react-native-vector-icons/fonts.gradle");

This is how my file looks now. In my case I was missing MaterialCommunityIcons and had Ionicicons or whatever was its name.

tarangshah19 commented 3 months ago

can you please tell me react-native-vector-icons/MaterialIcons working on ios or not? i am trying since last week not able to use react-native-vector-icons/MaterialIcons in ios

alordiel commented 3 months ago

I am developing only for Android and haven't built anything for iOS (yet). But from the other issues I'm seeing there might be some problem with newer versions and iOS #1604. I am using "react-native-vector-icons": "10.0.3", "react-native": "0.73.6", "react": "18.2.0" without expo. Not sure if using those save versions will do the trick for you.

ColtraneNadler commented 2 months ago

i am having the issue in ios environment .... react-native 0.72.6 and 0.73.*

johnf commented 2 weeks ago

Can you run through these steps in troubleshooting https://github.com/oblador/react-native-vector-icons?tab=readme-ov-file#red-screen-with-unrecognized-font-family-error-on-ios

johnf commented 6 days ago

Closed due to no response