Home > Software design >  "None of these files exist" when try to use vertical icons reac native
"None of these files exist" when try to use vertical icons reac native

Time:12-13

I have installed React Native Vector Icons, I have changed the android/app/build.gradle adding apply from: "../../node_modules/react-native-vector-icons/fonts.gradle".

When i try to import icons in the file (for example):

import React from 'react';
import {StatusBar, StyleSheet, Text, FlatList, View, TextInput, Button} from 'react-native';
import { Ionicons } from "react-native-vector-icons/MaterialIcons";

const HomeScreen = () => {
    return (
        <View style={styles.page}>
            <Ionicons name="ios-camera-reverse" />
        </View>
    );
};

export default HomeScreen;

then i got an error (screen).[enter image description here][1]

I have installed React Native Vector Icons, I have changed the android/app/build.gradle adding  **apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"**. 


  [1]: https://i.stack.imgur.com/eNps6.png

CodePudding user response:

Try to change Import:

import Ionicons from "react-native-vector-icons/MaterialIcons";

check default import here: https://github.com/oblador/react-native-vector-icons/blob/master/MaterialIcons.js

  • Related