yarn android时,获取连接报错

发布于 2022-09-12 13:55:43 字数 5496 浏览 13 评论 0

Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443
Invalid https.proxyPort '', using default 443

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command\_line\_interface.html#sec:command\_line\_warnings

FAILURE: Build failed with an exception.

 What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
 > Could not resolve androidx.multidex:multidex:2.0.0.
 Required by:
 project :app
 > Could not resolve androidx.multidex:multidex:2.0.0.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/2.0.0/multidex-2.0.0.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/multidex/multidex/2.0.0/multidex-2.0.0.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect
 > Could not resolve androidx.swiperefreshlayout:swiperefreshlayout:1.0.0.
 Required by:
 project :app
 project :app > com.facebook.react:react-native:0.63.4
 > Could not resolve androidx.swiperefreshlayout:swiperefreshlayout:1.0.0.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 Required by:
 project :app > project :react-native-audio
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 Required by:
 project :app > com.facebook.react:react-native:0.63.4
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 Required by:
 project :app > com.github.czy1121:settingscompat:1.1.4
 > Could not resolve androidx.appcompat:appcompat:1.0.2.
 > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Could not GET 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom'.
 > Connect to dl.google.com:443 [dl.google.com/203.208.46.146] failed: Connection timed out: connect

 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 45m 43s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

问题出现的环境背景及自己尝试过哪些方法

  1. 已执行过tyarn命令
  2. 试过翻墙软件
  3. 更改过host文件
  4. 如下图所示configuring执行了50多分钟 然后有了上文的报错

ps: 这些依赖好像都是用的implementation引入的

image

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文