Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

71
Views
why are my icons showing up like this? this is react-native-vector-icons

enter image description here

When I insert the icon in my code when it appears in the emulator it appears as it appears in the print

7 months ago · Juan Pablo Isaza
1 answers
Answer question

0

This caused by the app JS bundle and font assets are not in sync.

Following step below as per official documentation

This method has the advantage of fonts being copied from this module at build time so that the fonts and JS are always in sync, making upgrades painless.

Edit android/app/build.gradle ( NOT android/build.gradle ) and add the following:

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" To customize the files being copied, add the following instead:

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


apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
7 months ago · Juan Pablo Isaza Report
Answer question
Find remote jobs