Navigation are not working in react native (package react-navigation ) || don't show error just white screen

52 views Asked by At

detail of my project tools :- i use expo go and my project is build on Expo

NavigaitonScreen.jsx


import { createNativeStackNavigator } from "@react-navigation/native-stack";
import OnBoardingScreen1 from "../screens/on_boarding_screen/OnBoardingScreen1";
import OnBoardingScreen2 from "../screens/on_boarding_screen/OnBoardingScreen2";
import OnBoardingScreen3 from "../screens/on_boarding_screen/OnBoardingScreen3";

const Stack = createNativeStackNavigator();
export default function NavigationScreen() {
  return (
    <Stack.Navigator initialRouteName="OnBoardingScreen1">
      <Stack.Screen name="OnBoardingScreen1" component={OnBoardingScreen1} />
      <Stack.Screen name="OnBoardingScreen2" component={OnBoardingScreen2} />
      <Stack.Screen name="OnBoardingScreen3" component={OnBoardingScreen3} />
    </Stack.Navigator>
  );
}

RootNavigation.jsx


import { NavigationContainer } from "@react-navigation/native";
import NavigationScreen from "./NavigationScreen";

export default function RootNavigation() {
  return (
    <NavigationContainer>
      <NavigationScreen />
    </NavigationContainer>
  );
}



App.js

import React from "react";
import { View } from "react-native";
import RootNavigation from "./src/navigations/RootNavigation";

const App = () => {
  return (
    <View>
      <RootNavigation />
    </View>
  );
};

export default App;

in my screen i see only white screen but our OnBoardingScreen{1,2,3}.jsx contain image , text with one button

  • and if i try to test this screen individually then they are appear in the screen
  • after putting navigation they don't show me expect white screen no error throw

here is my console output :-

Logs for your project will appear below. Press Ctrl+C to exit.
Unable to resolve asset "./assets/adaptive-icon.png" from "android.adaptiveIcon.foregroundImage" in your app.json or app.config.js
Android Bundling failed 1653ms
Unable to resolve "../../assets/images/on_boarding_assets/on_boarding-1-assets/onBoarding_image.png" from "src/screens/on_boarding_screen/OnBoardingScreen1.jsx"
› Reloading apps
Unable to resolve asset "./assets/icon.png" from "icon" in your app.json or app.config.js
Android Bundling failed 2710ms
Unable to resolve "../../../style/GeneralStyle" from "src/screens/on_boarding_screen/OnBoardingScreen1.jsx"
› Reloading apps
Unable to resolve asset "./assets/icon.png" from "icon" in your app.json or app.config.js
Android Bundling complete 6275ms

› Reloading apps
Unable to resolve asset "./assets/icon.png" from "icon" in your app.json or app.config.js
Android Bundling complete 114ms


i want you to please any one guide me what i can do and where i am wrong

  • or if you have any question related to that please ask - THANKYOU
0

There are 0 answers