I have tried every solution that is being provided from this Invariant Violation: requireNativeComponent: "RNSScreen" was not found in the UIManager which the duplicate of my question. Yet, none of it works. BTW I am working on android, not on IOS so 'pod install' would not work for me.
I get this error when I tired implementing react native navigation from this source: https://reactnavigation.org/docs/hello-react-navigation
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/native": "^6.0.2",
"@react-navigation/stack": "^6.0.7",
"react": "17.0.1",
"react-native": "0.64.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.4.0"
}
// App.js
import React from 'react';
import { StyleSheet} from 'react-native';
import ProductLists from './screen/ProductLists.js';;
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
const Stack = createStackNavigator();
const App = () => {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName={ProductLists}>
<Stack.Screen name="Home" component={ProductLists} />
</Stack.Navigator>
</NavigationContainer>
)
}
export default App;
P.S. I have tried following this too, still getting the same errors: https://reactnative.dev/docs/0.64/navigation