reactjs - 尝试在 React Native 中注册两个同名的 View RTCVideoView

标签 reactjs react-native

enter image description here

我正在尝试在 Android 上运行我的应用程序,但出现此错误我不知道为什么会出现此错误,我不知道是什么导致了我的项目中出现此错误
我尝试了很多方法来解决此问题,但仍然无法解决此问题。

试图注册两个同名的 View RTCVideoView

我的 Package.json 是

{
  "name": "Hello World",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@ptomasroos/react-native-multi-slider": "^1.0.0",
    "@react-native-community/async-storage": "^1.6.2",
    "@react-native-community/slider": "^2.0.0",
    "axios": "^0.19.0",
    "connectycube-reactnative": "^1.7.3",
    "lodash": "^4.17.15",
    "moment": "^2.24.0",
    "prop-types": "^15.7.2",
    "react": "16.8.6",
    "react-native": "0.60.5",
    "react-native-autogrow-textinput": "^5.2.0",
    "react-native-cache-store": "^1.0.2",
    "react-native-calendars": "^1.212.0",
    "react-native-deck-swiper": "^1.6.7",
    "react-native-image-picker": "^1.1.0",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-modal-datetime-picker": "^7.5.0",
    "react-native-navigation": "^3.0.0",
    "react-native-scrollable-tab-view": "^0.10.0",
    "react-native-swiper": "^1.5.14",
    "react-native-vector-icons": "^6.6.0",
    "react-native-view-overflow": "^0.0.4",
    "react-native-webrtc": "^1.75.0",
    "react-redux": "^7.1.1",
    "redux": "^4.0.4",
    "redux-logger": "^3.0.6",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.3.0",
    "rn-prompt": "^1.0.4"
  },
  "devDependencies": {
    "@babel/core": "^7.6.0",
    "@babel/runtime": "^7.6.0",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.9.0",
    "eslint": "^6.4.0",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.56.0",
    "react-test-renderer": "16.8.6"
  },
  "jest": {
    "preset": "react-native"
  }
}

任何帮助,将不胜感激。

最佳答案

您只需要通过以下命令清理缓存

npm cache clean --force
这很可能会解决您的问题

关于reactjs - 尝试在 React Native 中注册两个同名的 View RTCVideoView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58292194/

相关文章:

javascript - 初学者如何使用yarn启动ReactJS服务器

javascript - 在mapStateToProps之前初始化状态?

javascript - 使用reactjs从内部组件获取输入值

reactjs - React Native FlatList 与 ListView

reactjs - 当值来自 redux 并在子进程中更新时,React Navigation : How to update navigation title for parent,?

reactjs - React 无状态函数组件 defaultProps 函数

react-native - 未定义不是评估 _this.props.navigation 的对象

android-studio - 如何在 android studio 中设置 2 个 android 模拟器来测试 React Native 应用程序

reactjs - 在组件外部访问的 Redux 存储返回初始状态

android - react native 错误:重复的资源, Assets 出现在某些屏幕中,而不出现在其他人的android版本APK中