gpt4 book ai didi

android - Gradle无法下载Android软件包

转载 作者:行者123 更新时间:2023-12-02 20:13:50 24 4
gpt4 key购买 nike

我有一个带有Android SDK的docker容器。我正在尝试使用gradlew构建一个Android Java应用程序。事情是,如果我需要从互联网下载,我需要使用代理。为此,我已将自己的android和gradle配置为使用代理设置。

我可以使用command从命令行下载软件包

android update sdk



但是,当我运行gradlew时,它可以从jcentre下载依赖项,但尝试下载一些我认为的Android程序包失败。我粘贴了以下错误消息。

猫/root/.android/androidtool.cfg
sdkman.force.http=true
http.proxyHost=gateway.bns
http.proxyPort=8000

猫gradle.properties
systemProp.http.proxyHost=xyz.abc
systemProp.http.proxyPort=8000
systemProp.http.nonProxyHosts=*.abc
systemProp.https.proxyHost=xyz.abc
systemProp.https.proxyPort=8080
systemProp.https.nonProxyHosts=*.abc

./gradlew清洁测试组装
DK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

Error:

File /root/.android/repositories.cfg could not be loaded.
java.net.ConnectException: Connection timed out (Connection timed out)
IOException: https://dl.google.com/android/repository/addons_list-3.xml
java.net.ConnectException: Connection timed out (Connection timed out)
IOException: https://dl.google.com/android/repository/addons_list-2.xml
java.net.ConnectException: Connection timed out (Connection timed out)
IOException: https://dl.google.com/android/repository/addons_list-1.xml
java.net.ConnectException: Connection timed out (Connection timed out)
Failed to download any source lists!

最佳答案

如果您使用的插件版本比2.2.3更新,我认为可以将其链接到: Unable to update sdk dependencies with latest android gradle plugin

关于android - Gradle无法下载Android软件包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44929694/

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