Icons doesnt work. (Hieroglyphs / ? symbol / crossedbox)
React Native 0.42 Windows 10
Icons are not rendering correctly. It returns hieroglyphs or crossedBox (if icon name is correct), and ? symbol (if icon name is incorrect).
What have i done wrong?
Have you followed these steps?
Open your solution in Visual Studio, right click the Assets folder in your solution, click Add Existing.
Browse to the node_modules\react-native-vector-icons\Fonts folder, select the required font files
Click the Add drop-down and select Add as Link.
Set Copy To Output Directory property of each font file to Copy if newer
Can share your .csproj file ?
I'm facing exactly same problem. I don't know what else to do. I don't use visual studio.
@wyz1 , how did you add the fonts to your project? Are you using Android or React-Native-Windows?
@jmcginty ,thanks it's working now. I use react-native android. I had to stop the react-native server and cd into the android folder then I ran a clean command. It works now. It was a tough one though.
My issue was I forgot to copy the font file to assets/fonts and the [X] got cached.
I proved it by changing com.oblador.vectoricons.VectorIconsModule and changing cacheFile.exists() to false