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

The icons show up as a crossed out box on android device #1479

Closed RAzaALy closed 8 months ago

RAzaALy commented 1 year ago

Environment

"react-native-vector-icons": "^9.2.0", "react-native": "^0.70.6",

Description

Describe your issue in detail. Include screenshots if needed.

The icons show up as a crossed out box on android device I'm also added these line to build.gradle according to docs

project.ext.vectoricons = [ iconFontNames: [ 'FontAwesome.ttf', 'FontAwesome5_Regular.ttf', 'FontAwesome5_Solid.ttf', 'FontAwesome5_Brands.ttf'] // <-- add this line (1/2) ] apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

And I'm also face this warn device code

warn Package react-native-vector-icons contains invalid configuration: "dependency.assets" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.

skeie commented 1 year ago

I had the same problem, but I upgraded to the latest (9.2.0) and it worked!

skompaniets commented 1 year ago

I had the same problem, but I upgraded to the latest (9.2.0) and it worked!

do you have problem with installing on ios?

skeie commented 1 year ago

I haven't tried, sorry!

RajeshBatth commented 1 year ago

facing same issue in 9.2.0

Cookizza commented 1 year ago

You are likely missing this line apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

from your /android/app/build.grade

Check the location (there is more than one build.gradle - be sure its the /app/ directory version

Install info is here https://github.com/oblador/react-native-vector-icons#android

yakupdurmus commented 1 year ago

Same problem,

I added apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" in /android/app/build.gradle file but icon not showing on android.

"react-native": "0.71.1", "react-native-vector-icons": "^9.2.0",

yakupdurmus commented 1 year ago

Same problem,

I added apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" in /android/app/build.gradle file but icon not showing on android.

"react-native": "0.71.1", "react-native-vector-icons": "^9.2.0",

I solved this problem.

I downgraded the react-native-vector-icon package. Problem solved. I think there is a problem with the new version. You can use 9.1.0 version.

"react-native-vector-icons": "9.1.0"

@RAzaALy

fanzhiri commented 1 year ago

same problem react-native:0.70.7 react-native-vector-icons:^9.2.0 showing a crossed out box on android

ogbodo commented 1 year ago

Having same issue on yarn workspace mono repo react-native 0.71.7 react-native-vector-icons:9.2.0

Please any pointer to a solution would be greatly appreciated. Thanks

HaNguyenRN commented 1 year ago

I downgraded the react-native-vector-icon package. Problem solved. I think there is a problem with the new version. You can use 9.0.0 version.

"react-native-vector-icons": "9.0.0"

mohamed2m2018 commented 1 year ago

I had the same problem with 9.2.0 and I downgraded to 9.1.0 but still not resolved

Edit: was missing adding this

project.ext.vectoricons = [ iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf' ] // Name of the font files you want to copy ]

in app/build.gradle

vishnun commented 9 months ago

You are likely missing this line apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

from your /android/app/build.grade

Check the location (there is more than one build.gradle - be sure its the /app/ directory version

Install info is here https://github.com/oblador/react-native-vector-icons#android

This is part of the readme but somehow got missed

cheriviralakarthik commented 8 months ago

i had same problem solved by adding the fonts of vectoricons( nodemodules/react-native-vector-icons) in android/app/src/main/assets/fonts

cheriviralakarthik commented 8 months ago

I think autolinking is not working

developerdanx commented 8 months ago

have the same problem and I prepared a small PR to update the README https://github.com/oblador/react-native-vector-icons/pull/1567

venux92 commented 5 months ago

I actually removed the 2 lines from android/app/build.grade and added the fonts manually in main/assets/fonts and it solved the issue for me.

"react-native-vector-icons": "10.0.3"