派发了不受支持的顶级事件类型“ onGestureHandlerStateChange”

时间:2019-10-02 21:20:50

标签: javascript android react-native expo react-navigation-drawer

Image

应用尝试导航后会崩溃,而使用expo不会崩溃,仅在生产模式下并使用通过Expo构建的apk会崩溃

我已经删除并安装了模块,并尝试降级和更新react-navigation

"react": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
"react-native-datepicker": "^1.7.2",
"react-native-dialog": "^5.5.0",
"react-native-dialog-input": "^1.0.7",
"react-native-root-toast": "^3.0.2",
"react-native-snackbar": "^0.5.5",
"react-native-table-component": "^1.2.0",
"react-navigation": "^3.3.0",
"react-redux": "^6.0.1",

调度了不受支持的顶级事件类型“ onGestureHandlerStateChange”

1 个答案:

答案 0 :(得分:2)

请按照以下步骤操作:

  1. 删除您的node_modules目录和package-lock.json文件
  2. 在package.json中将react-navigation版本修改为^3.11.1
  3. 运行npm install
  4. 运行expo install react-native-gesture-handler react-native-reanimated react-navigation
  5. expo start -c上运行

这应该设置一个兼容版本的反应导航并解决您的手势问题。

希望这会有所帮助!