由于引入的三方组件依赖了不同版本的其他组件导致重复引入
package.json键入resolutions你的依赖+版本如
"resolutions": {
"@react-native-community/viewpager": "^3.1.0"
},
删除你的node_modules文件夹 然后运行yarn
开启Metro时清缓存
react-native start --reset-cache
方案来源
https://github.com/ptomasroos/react-native-scrollable-tab-view/issues/1056
https://github.com/ant-design/ant-design-mobile-rn/issues/697