“Réagir les icônes natives” Réponses codées

React icônes vectorielles natives

1-npm install --save react-native-vector-icons
2-Edit android/app/build.gradle : (add below code)
    apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
3-Edit android/settings.gradle : (add below codes)
	+ include ':react-native-vector-icons'
	+ project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
4-Edit android/app/build.gradle : (add below code to dependencies)
    dependencies {
    ...
    compile project(':react-native-vector-icons')
}
5-import fontawesome to App.js :
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
zizi-engi

icône shwoing a box react icônes vectorielles natives

In 'android/app/build.gradle' (not in android/build.gradle),

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

Then,
react-native link react-native-vector-icons 
react-native run-android
react-native start
Bad Buffalo

Réagir les icônes natives

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"
Xenophobic Xenomorph

Réponses similaires à “Réagir les icônes natives”

Questions similaires à “Réagir les icônes natives”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code