gpt4 book ai didi

react-native - 不变违规 : ViewPagerAndroid has been removed from React Native. Expo v35 到 v39 迁移

转载 作者:行者123 更新时间:2023-12-04 01:13:00 28 4
gpt4 key购买 nike

尝试了大部分解决方案,甚至 updated all the packages但它们都不适合我。

一段时间后接触这个项目,所以正在从中迁移

React Native Expo v35 到 v39。


错误堆栈跟踪:

Error Stack Trace

我的包裹 list :

包.json

  "dependencies": {
"@apollo/react-components": "^3.0.1",
"@apollo/react-hoc": "^3.1.1",
"@apollo/react-hooks": "^3.0.0",
"@react-native-community/async-storage": "~1.12.0",
"@react-native-community/viewpager": "^4.1.6",
"apollo-boost": "^0.4.4",
"apollo-fetch": "^0.7.0",
"apollo-link": "^1.2.13",
"apollo-link-context": "^1.0.19",
"crypto": "^1.0.1",
"crypto-js": "^4.0.0",
"expo": "^39.0.3",
"expo-facebook": "~9.0.0",
"expo-font": "~8.3.0",
"expo-google-app-auth": "^8.0.0",
"expo-image-picker": "~9.1.0",
"expo-notifications": "~0.7.2",
"graphql": "^14.4.2",
"moment": "^2.24.0",
"native-base": "^2.13.8",
"react": "16.13.1",
"react-apollo": "^3.1.3",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
"react-native-aws3": "^0.0.9",
"react-native-gesture-handler": "~1.7.0",
"react-native-google-places-autocomplete": "^1.4.1",
"react-native-material-ripple": "^0.9.1",
"react-native-modal": "^11.5.6",
"react-native-modal-datetime-picker": "^7.6.0",
"react-native-multiple-select": "^0.5.3",
"react-native-paper": "^3.0.0",
"react-native-picker-select": "^6.3.3",
"react-native-screens": "~2.10.1",
"react-native-status-bar-height": "^2.4.0",
"react-native-vector-icons": "^6.6.0",
"react-native-web": "~0.13.7",
"react-navigation": "^4.4.2",
"react-navigation-drawer": "^1.4.0",
"react-navigation-stack": "^1.7.3",
"react-navigation-tabs": "^1.2.0",
"react-redux": "^7.1.1",
"redux": "^4.0.4",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"@graphql-codegen/introspection": "^1.12.2",
"@types/react": "~16.9.35",
"@types/react-native": "~0.63.2",
"babel-jest": "^24.9.0",
"babel-preset-expo": "^8.3.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.15.1",
"jest": "^24.9.0",
"jest-environment-enzyme": "^7.1.1",
"jest-enzyme": "^7.1.1",
"react-test-renderer": "16.8.3",
"typescript": "~3.9.2"
},
"private": true
}

根据我的阅读,是某个软件包导致了这个问题。

有人可以帮我找到基于 Trace Stack 的包吗?我找不到它。

最佳答案

包名称: react-navigation

如何搜索:在您的 VS Code 中搜索 ViewPagerAndroid,不要排除 node_modules

您需要更换什么?

从'react-native'导入{ViewPagerAndroid}

从“@react-native-community/viewpager”导入 ViewPagerAndroid


注意:您将需要添加 @react-native-community/viewpager

关于react-native - 不变违规 : ViewPagerAndroid has been removed from React Native. Expo v35 到 v39 迁移,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64242137/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com