错误:NativeViewGestureHandler 必须用作 GestureHandlerRootView 的后代。否则手势将无法被识别。有关更多详细信息,请参阅https://docs.swmansion.com/react-native-gesture-handler/docs/installation。
有什么解决办法吗?
我尝试了很多方法但没有用... 期待一些相关的答案...
你需要用 GestureHandlerRootView 包裹
import { GestureHandlerRootView } from 'react-native-gesture-handler';
export default function App() {
return (
<GestureHandlerRootView>
{/* Your entire application components */}
</GestureHandlerRootView>
);
}