反应本机 | @react-native-community_picker 未在 android 上解析
React Native | @react-native-community_picker is not resolved on android
我正在为我的移动应用程序使用 React Native Boilerplate。这是我第一次 运行 宁它。它在 ios 模拟器上运行良好,但在 android 模拟器上显示错误。
在 运行ning run-android
时显示以下错误
A problem occurred configuring project ':@react-native-community_picker'.
> Could not resolve all artifacts for configuration ':@react-native-
community_picker:classpath'.
> Could not resolve com.android.tools.build:gradle:3.2.1.
Required by:
project :@react-native-community_picker
> Could not resolve com.android.tools.build:gradle:3.2.1.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
我尝试再次安装此 npm @react-native-community/picker
和 运行。它不起作用。
packag.json
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/picker": "^1.6.5",
"@react-navigation/native": "^5.5.0",
"@react-navigation/stack": "^5.4.1",
"axios": "^0.19.2",
"immer": "^6.0.9",
"intl": "^1.2.5",
"react": "^16.13.1",
"react-intl": "^2.8.0",
"react-native": "0.62.2",
"react-native-gesture-handler": "^1.6.1",
"react-native-reanimated": "^1.9.0",
"react-native-safe-area-context": "^3.0.2",
"react-native-screens": "^2.8.0",
"react-redux": "^7.2.0",
"redux-saga": "^1.1.3",
"reselect": "^4.0.0"
提前致谢!
我刚刚更新了这个 npm @react-native-community/picker。现在正在运行。
已更新Package.json
"@react-native-community/picker": "^1.6.6",
"@react-navigation/native": "^5.5.0",
"@react-navigation/stack": "^5.4.1",
"axios": "^0.19.2",
"immer": "^6.0.9",
"intl": "^1.2.5",
"native-base": "^2.13.13",
"react": "^16.13.1",
"react-intl": "^2.8.0",
"react-native": "0.62.2",
"react-native-gesture-handler": "^1.6.1",
"react-native-reanimated": "^1.9.0",
"react-native-safe-area-context": "^3.0.2",
"react-native-screens": "^2.8.0",
"react-native-swipe-list-view": "^3.2.3",
"react-redux": "^7.2.0",
"redux-saga": "^1.1.3",
"reselect": "^4.0.0"```
我正在为我的移动应用程序使用 React Native Boilerplate。这是我第一次 运行 宁它。它在 ios 模拟器上运行良好,但在 android 模拟器上显示错误。
在 运行ning run-android
A problem occurred configuring project ':@react-native-community_picker'.
> Could not resolve all artifacts for configuration ':@react-native-
community_picker:classpath'.
> Could not resolve com.android.tools.build:gradle:3.2.1.
Required by:
project :@react-native-community_picker
> Could not resolve com.android.tools.build:gradle:3.2.1.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.2.1/gradle-3.2.1.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
我尝试再次安装此 npm @react-native-community/picker
和 运行。它不起作用。
packag.json
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/picker": "^1.6.5",
"@react-navigation/native": "^5.5.0",
"@react-navigation/stack": "^5.4.1",
"axios": "^0.19.2",
"immer": "^6.0.9",
"intl": "^1.2.5",
"react": "^16.13.1",
"react-intl": "^2.8.0",
"react-native": "0.62.2",
"react-native-gesture-handler": "^1.6.1",
"react-native-reanimated": "^1.9.0",
"react-native-safe-area-context": "^3.0.2",
"react-native-screens": "^2.8.0",
"react-redux": "^7.2.0",
"redux-saga": "^1.1.3",
"reselect": "^4.0.0"
提前致谢!
我刚刚更新了这个 npm @react-native-community/picker。现在正在运行。
已更新Package.json
"@react-native-community/picker": "^1.6.6",
"@react-navigation/native": "^5.5.0",
"@react-navigation/stack": "^5.4.1",
"axios": "^0.19.2",
"immer": "^6.0.9",
"intl": "^1.2.5",
"native-base": "^2.13.13",
"react": "^16.13.1",
"react-intl": "^2.8.0",
"react-native": "0.62.2",
"react-native-gesture-handler": "^1.6.1",
"react-native-reanimated": "^1.9.0",
"react-native-safe-area-context": "^3.0.2",
"react-native-screens": "^2.8.0",
"react-native-swipe-list-view": "^3.2.3",
"react-redux": "^7.2.0",
"redux-saga": "^1.1.3",
"reselect": "^4.0.0"```