react-native-gesture-handler: [Android] [RN 0.56.0] Invariant Violation: requireNativeComponent: "GestureHandlerRootView" was not found in the UIManager.
I’m getting the following error when starting my App on Android (in Debug) with RN 0.56.0:
Is anyone else seeing this error, or has seen it before?
Some additional information
I’m using react-native-navigation and followed the guide to replace my Views with gestureHandlerRootHOC(…)
in Navigation.registerComponent(…)
.
I’m starting a tab-based App (Navigation.startTabBasedApp(…)
), where Profile
is the last tab. If I remove Profile
, the now last tab will be where the error occurs.
I made Profile
render just a single View. If there are nested Views, the Error occurs in the first Component without children.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (3 by maintainers)
@abhidatta0 It did not solve it for me. my app works fine when I use Expo Go but I keep getting the error when I run the developer build of the app:
Invariant Violation: requireNativeComponent: "RNGestureHandlerRootView" was not found in the UIManager.
This issue i had when using react-navigation in a project .Installing gesture-handle library solved this.
import 'react-native-gesture-handler'
Just published 1.0.6 that includes this fix. Thanks everyone for reporting and testing the fix!
After a week of trying various solutions, I had to add the following in the android/build.gradle and then do an “npx react-native run-android” to fix this issue (typing it here so it might help someone else)
buildscript { ext { ... kotlinVersion = "1.5.20" } }
delete the node modules, run expo install and then expo install react-native-gesture-handler
Ah, looks like @mars-lan is right. We should revert the change that removed view manager for GestureHandlerRootView. Should have a fix ready shortly
@kmagiera
https://github.com/kmagiera/react-native-gesture-handler/pull/199 seems to be the culprit. Still need a ViewManager to expose RNGestureHandlerRootView to JS side.
I did this and it fixed it, I don’t use expo though so for me it was just
npm i
Facing the same issue
just Install This lib:
yarn add react-native-safe-area-context
it worked for me every timesame error on iOS hasn’t anybody solved this issue yet ?