gpt4 book ai didi

javascript - 不再支持通过 UIManager ['getConstants' 直接从 UIManager 访问 View 管理器配置

转载 作者:行者123 更新时间:2023-11-30 19:16:20 28 4
gpt4 key购买 nike

我已经安装了 react-navigation react-navigation react-native-gesture-handler 我正在使用 expo 在 xcode 模拟器上运行应用程序

Accessing view manager configs directly off UIManager via UIManager['getConstants'] is no longer supported. Use UIManager.getViewManagerConfig('getConstants') instead.
- node_modules/expo/build/environment/muteWarnings.fx.js:17:23 in warn
- node_modules/react-native/Libraries/ReactNative/UIManager.js:164:12 in get
- node_modules/react-native/Libraries/Utilities/defineLazyObjectProperty.js:42:18 in getValue
- node_modules/react-native-gesture-handler/createHandler.js:39:2 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-native-gesture-handler/NativeViewGestureHandler.js:3:0 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-native-gesture-handler/createNativeWrapper.js:3:0 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-native-gesture-handler/GestureHandler.js:1:0 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-native-gesture-handler/Swipeable.js:10:0 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-native-gesture-handler/index.js:1:0 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-navigation-stack/lib/module/views/StackView/StackViewLayout.js:1:942 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-navigation-stack/lib/module/views/StackView/StackView.js:1:670 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-navigation-stack/lib/module/navigators/createStackNavigator.js:1:122 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/react-navigation-stack/lib/module/index.js:1:35 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
* App.js:4:0 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/expo/AppEntry.js:4:0 in <unknown>
- node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation
- node_modules/metro/src/lib/polyfills/require.js:197:45 in guardedLoadModule
* null:null in global code

最佳答案

确定是:

"react-native-gesture-handler": "~1.3.0"

1- 检查 package.json 版本号前是否有 '~' 而不是 '^'。

2- 删除 node_modules 文件夹和 package-lock.json 文件

3- 执行 npm 安装

关于javascript - 不再支持通过 UIManager ['getConstants' 直接从 UIManager 访问 View 管理器配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57955184/

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