react-native-vector-icons icon indicating copy to clipboard operation
react-native-vector-icons copied to clipboard

Icons doesnt work. (Hieroglyphs / ? symbol / crossedbox)

Open cricketnest opened this issue 9 years ago • 5 comments

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?

cricketnest avatar Mar 02 '17 10:03 cricketnest

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 ?

jmcginty avatar Mar 02 '17 21:03 jmcginty

I'm facing exactly same problem. I don't know what else to do. I don't use visual studio.

victorighalo avatar Jun 18 '17 15:06 victorighalo

@wyz1 , how did you add the fonts to your project? Are you using Android or React-Native-Windows?

jmcginty avatar Jun 18 '17 22:06 jmcginty

@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.

victorighalo avatar Jun 19 '17 06:06 victorighalo

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

Pyrolistical avatar Jul 23 '17 06:07 Pyrolistical