Have you followed all the installation instructions for react-native-gesture-handler
?
From https://software-mansion.github.io/react-native-gesture-handler/docs/getting-started.html :
"Update your MainActivity.java file:"
package com.swmansion.gesturehandler.react.example;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate; //Add this...
import com.facebook.react.ReactRootView; //...and this...
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; //...and this
public class MainActivity extends ReactActivity {
@Override
protected String getMainComponentName() {
return "Example";
}
//Add this function
@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}