react-native-context-menu-view
react-native-context-menu-view copied to clipboard
Invariant Violation: requireNativeComponent: "ContextMenu" was not found in the UIManager.
When using this component I encounter the following error:
ios works fine but android gives error.
I've tried:
Restarting computer Re-adding and re installing with yarn (I don't use npm) A bunch of stuff with pods I can't even remember
"react-native-context-menu-view": "^1.9.1" "react-native": "0.69.7",
Same issue with react-native 0.71.8
same issue now it is 0.78
For Expo users: I was able to solve this by simply rebuilding in Expo.
Same issue - @AlanHazel how did you rebuild expo? expo start with the --clear flag?
clearing the cache build doesn't help in expo
I updated the example app to the latest react native and built fresh and I am not seeing the error unfortunately
Can it be the android version?
I had this issue at one point on android, and running the following cleared it up:
rm -rf node_modules
cd android
./gradlew clean
cd ../
yarn install
react-native run-android --reset-cache
Same problem with Expo here. My versions: This lib is 1.14.1, Expo v. 49.0.21, React Native v. 0.72.6.
Tried cleaning Expo cache, expo install --check, start with npx expo start --clear, nothing worked. I get the same error both in Android and iOS.
@mpiannucci please have a look, I am also getting the same issue.
"expo": "~49.0.21" "react": "18.2.0" "react-native": "0.72.6" "react-native-context-menu-view": "^1.14.1"
I also faced this issue in expo and when i run with development build, i can able to use the component without any error. If anyone facing same issue refer this expo documentation
For those who are still facing the error on expo, you need to -
- Install this library using
npm install react-native-context-menu-view --save. - Run
eas build --profile developmentto create a new development build.