首页 > 解决方案 > 世博会:UIManager 抛出警告 UIManager

问题描述

此消息似乎某些包正在使用 UIManager["RCTView"] 不再受支持,但我不确定如何解决此问题

不再支持通过 UIManager['RCTView'] 直接从 UIManager 访问视图管理器配置。请改用 UIManager.getViewManagerConfig('RCTView') 。- 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/GestureHandler.js:46:10 in - node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation - node_modules/react-native-gesture-handler/index.js:3:0 in - node_modules/metro/src/lib/polyfills/require.js:331:6 in loadModuleImplementation - node_modules/react-navigation-stack/src/views /StackView/StackViewLayout.js:19:

标签: react-nativeexpouimanager

解决方案


这是由 react-navigation 模块引起的。我假设您使用的是 expo sdk 33。

  1. 如果您使用的是 react-navigation v3,您可以降级到版本 2,这应该可以解决问题。或者..

  2. 将您的 expo-cli 更新到最新版本。安装最新的反应导航。然后按如下方式安装附加模块。

expo install react-native-gesture-handler react-native-reanimated

如文档中所述


推荐阅读