Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
RAzaALy opened this issue Jan 10, 2023 · 16 comments
Closed

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

RAzaALy opened this issue Jan 10, 2023 · 16 comments

Comments

@RAzaALy
Copy link

RAzaALy commented Jan 10, 2023

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
Copy link

skeie commented Jan 19, 2023

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

@skompaniets
Copy link

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
Copy link

skeie commented Jan 20, 2023

I haven't tried, sorry!

@RajeshBatth
Copy link

facing same issue in 9.2.0

@Cookizza
Copy link

Cookizza commented Feb 14, 2023

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
Copy link

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
Copy link

yakupdurmus commented Mar 4, 2023

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
Copy link

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

@ogbodo
Copy link

ogbodo commented May 8, 2023

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

@ha-nguyen-enosta
Copy link

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
Copy link

mohamed2m2018 commented Jul 2, 2023

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
Copy link

vishnun commented Sep 17, 2023

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
Copy link

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

@cheriviralakarthik
Copy link

I think autolinking is not working

@johnf johnf closed this as completed Oct 28, 2023
@developerdanx
Copy link
Contributor

have the same problem and I prepared a small PR to update the README
#1567

@venux92
Copy link

venux92 commented Jan 16, 2024

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests