gpt4 book ai didi

ios - 不支持的顶级事件类型“在 iphone X 中调度的 onGestureHandlerStateChange

转载 作者:塔克拉玛干 更新时间:2023-11-02 07:53:02 26 4
gpt4 key购买 nike

我在 react-navigation-drawer 中遇到问题。

"react-native-gesture-handler": "^1.0.16",
"react-navigation": "^3.3.2"

安装了这两个版本。抽屉在 Android 和 iPhone 5S 中正常工作。但是,当我在 iPhone X 上运行该应用程序时,当我通过手势打开抽屉时会抛出错误。

Unsupported top level event type "onGestureHandlerStateChange" dispatched

最佳答案

来自这个react-native-gesture-handler issue comment通过 balthazar :

Because my navigators were created asynchronously, the handler was registered too late and thus throwing this error. I fixed the issue by simply doing:

import 'react-native-gesture-handler';

at the top of my index.js 🙂

通过 index.js,balthazar 指的是您应用程序的入口点——但我想重要的是它是在您第一次使用 react-native-gesture-handler 之前导入的

关于ios - 不支持的顶级事件类型“在 iphone X 中调度的 onGestureHandlerStateChange,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54923622/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com