These createBottomTabNavigator icons not showing when i run in my device, but icons are showing when i run using web?
what i need add to show createBottomTabNavigator icons. can anyone suggest me.
here this is App.js code from my project. i used
import * as React from 'react';
import 'react-native-gesture-handler';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import Index from "./pages/Index";
import Home from "./pages/Home";
import LogIn from "./pages/LogIn";
import Register from "./pages/Register";
import CplusBooks from "./pages/CplusBooks";
import PhpBooks from "./pages/PhpBooks";
import DotNetBooks from "./pages/DotNetBooks";
import SearchBooks from "./pages/SearchBooks";
const Tab = createBottomTabNavigator();
const stack = createStackNavigator();
export default () => (
<NavigationContainer>
<stack.Navigator>
<stack.Screen
name="Index"
component={Index}
options={{headerShown: false}}
/>
<stack.Screen
name="Home"
component={HomeTab}
options={{headerShown: false}}
/>
<stack.Screen
name="LogIn"
component={LogIn}
options={{headerShown: false}}
/>
<stack.Screen
name="Register"
component={Register}
options={{headerShown: false}}
/>
<stack.Screen
name="CplusBooks"
component={CplusBooks}
options={{headerShown: false}}
/>
<stack.Screen
name="PhpBooks"
component={PhpBooks}
options={{headerShown: false}}
/>
<stack.Screen
name="DotNetBooks"
component={DotNetBooks}
options={{headerShown: false}}
/>
</stack.Navigator>
</NavigationContainer>
);
2
Answers
It must be a problem with
react-native-vector-icons
Try this stepsOpen
android/app/build.gradle
and add the following:You can follow the instructions to properly install the module on Android: react-native-vector-icons#install-android
First, make sure you’re saving the dependency in your project by doing:
npm install react-native-vector-icons –save. Including the –save is necessary, otherwise react-native link won’t be able to locate the module.