简体   繁体   English

React-native:requireNativeComponent:升级到最新版本后在 UIManager 中找不到“RNGestureHandlerRootView”

[英]React-native: requireNativeComponent: "RNGestureHandlerRootView" was not found in the UIManager after upgrading to latest version react native

I just upgrading my react native project (CLI) from 0.66.1 to 0.70.6.我刚刚将我的 React Native 项目 (CLI) 从 0.66.1 升级到 0.70.6。 I run perfectly on iOS, but it occur this error when I run on android.[我在iOS上运行完美,但是在android上运行时出现这个错误。[在此处输入图像描述 ]. ]. My package.json:我的 package.json:

"react-native": "0.70.6",
"react": "18.1.0",
"react-native-safe-area-context": "^4.4.1",
 "react-native-screens": "^3.18.2",
   "@react-native-masked-view/masked-view": "^0.2.8",
    "@react-navigation/bottom-tabs": "^6.4.3",
    "@react-navigation/drawer": "^6.5.1",
    "@react-navigation/material-top-tabs": "^5.3.15",
    "@react-navigation/native": "^6.0.14",
    "@react-navigation/native-stack": "^6.9.2",
    "@react-navigation/stack": "^6.3.5",

How can I fix this issue?我该如何解决这个问题? Please help请帮忙

Recently I had the same problem.最近我遇到了同样的问题。 Here's the solution:这是解决方案:

You need add react-native-gesture-handler您需要添加 react-native-gesture-handler

yarn add react-native-gesture-handler or npm install react-native-gesture-handler

and Add this in App.js并将其添加到 App.js

import 'react-native-gesture-handler';

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React Native - requireNativeComponent:在 UIManager 中找不到“RTCVideoView” - React Native - requireNativeComponent: 'RTCVideoView' was not found in the UIManager 不变违规:requireNativeComponent:在 UIManager 中找不到“RNCSafeAreaView”。 在 react-native 和 expo 应用程序中 - Invariant Violation: requireNativeComponent: “RNCSafeAreaView” was not found in the UIManager. in react-native with expo app React native 不变冲突:requireNativeComponent:在 UIManager 中找不到“RNCViewPager” - React native Invariant Violation: requireNativeComponent: "RNCViewPager" was not found in the UIManager 不变违规:requireNativeComponent:在反应原生的 UIManager 中找不到“FastImageView” - Invariant Violation: requireNativeComponent: “FastImageView” was not found in the UIManager in react native 将 react-native 升级到最新版本 0.61.4 后找不到以下原生模块 - Could not find the following native modules after upgrading the react-native to latest version 0.61.4 将原生反应升级到最新版本 - Upgrading react native to latest version 将 react-native 升级到最新版本 0.61.5 后无法安装 pod - Could not install the pods after upgrading the react-native to latest version 0.61.5 React-Native-SVG 错误:不变违规:requireNativeComponent:在 UIManager 中找不到“RNSVGGroup” - React-Native-SVG Error: Invariant Violation: requireNativeComponent: "RNSVGGroup" was not found in the UIManager “不变违规:requireNativeComponent:在 UIManager 中找不到“RNSScreen”。” 反应本机 cli 中的错误 - 'Invariant Violation: requireNativeComponent: "RNSScreen" was not found in the UIManager.' error in react native cli 在 UIManager 中找不到 React Native“RNCSafeAreaView” - React Native "RNCSafeAreaView" was not found in the UIManager
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM