我是 React Native 的新手,并且在使用常规 React 方面有一些经验,我正在尝试进行 React Native 导航设置,但是在遵循文档时遇到以下错误。我尝试从头开始并重新安装所有内容,因为我不知道此错误意味着什么:
Invariant Violation: RNCSafeAreaProvider was not found in the UIManager any advice on how to fix this would be appreciated.
最佳答案
对于遇到此错误的任何人 - 我的安装方式一定是错误的,因为从一个新项目开始并按此顺序执行命令 - 我没有遇到同样的问题:
expo init '项目名称'
cd '项目名称'
npm 运行安卓
npm install @react-navigation/native
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
npm install @react-navigation/stack
关于reactjs - 不变违规 : RNCSafeAreaProvider was not found in the UIManager,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63779663/