我尝试在Windows 10的android-emulator上运行react-native应用程序。 但是我收到错误消息“无法初始化类org.apache.http.conn.ssl.SSLConnectionSocketFactory”。我找不到解决方法。
r
react-native --version
react-native-cli: 2.0.1
react-native: 0.62.0
react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 962 file(s) to forward-jetify. Using 16 workers...
info JS server already running.
info Installing the app...
FAILURE: Build failed with an exception.
* What went wrong:
Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
at makeError (D:\React\listapp2\node_modules\execa\index.js:174:9)
at Promise.all.then.arr (D:\React\listapp2\node_modules\execa\index.js:278:16)
at process._tickCallback (internal/process/next_tick.js:68:7)