react-native - 世博会: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-navigation 模块引起的。我假设您使用的是 expo sdk 33。
如果您使用的是 react-navigation v3,您可以降级到版本 2,这应该可以解决问题。或者..
将您的 expo-cli 更新到最新版本。安装最新的反应导航。然后按如下方式安装附加模块。
expo install react-native-gesture-handler react-native-reanimated
推荐阅读
- git - 在 git 中存储重复内容是一种反模式?
- javascript - 从 java serverlet 到另一个 jsp 的图像
- php - 仅在与单个单词兼容时更改
- java - 在 java 代码中使用 kotlin 库时的 Android 异常
- java - 如何最有效地使用 Java 8 功能在 ArrayList 中添加或替换自定义对象?
- hugo - 如何从正面创建侧面导航中的 Hugo 多级菜单
- rmi - 如何通过 Java 11 + Openwebstart 在 RMI 中使用 java.sql.Timestamp
- asp.net - .less 文件不渲染
- c - 使用数组的平均分数 - 由用户在特定时间输入
- c# - 使用 LINQ 进行聚合