“试图注册两个同名的视图 RNCSafeAreaProvider"IOS上的错误 [英] "tried to register two views with the same name RNCSafeAreaProvider" error on IOS

查看:11
本文介绍了“试图注册两个同名的视图 RNCSafeAreaProvider"IOS上的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I'm receiving the following error when running react native app using expo on IPhone (on android it's working correctly)

An image of the error is attached.

In addition, this is my package.json file:

{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},

"dependencies": {
"@expo/vector-icons": "^12.0.4",
"@react-native-community/masked-view": "^0.1.10",
"axios": "^0.21.1",
"expo": "~40.0.0",
"expo-app-loading": "^1.0.1",
"expo-font": "^9.0.0",
"expo-status-bar": "~1.0.3",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.0.1",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "^2.18.1",
"react-native-web": "~0.13.12",
"react-navigation": "^4.4.4",
"react-navigation-header-buttons": "^7.0.0",
"react-navigation-stack": "^2.10.4",
"react-redux": "^7.2.3",
"redux": "^4.0.5"
},

"devDependencies": {
"@babel/core": "^7.9.0" },
"private": true
}

Any idea will be appreciated.

解决方案

you have two versions of react-native-safe-area-context installed in your app. remove react-native-safe-area-context from your dependencies and run expo install react-native-safe-area-context

这篇关于“试图注册两个同名的视图 RNCSafeAreaProvider"IOS上的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆