[英]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.