gpt4 book ai didi

java - 无法解析 com.android.tools.build :gradle:7. 0.0

转载 作者:行者123 更新时间:2023-12-04 23:41:05 24 4
gpt4 key购买 nike

我刚刚安装了 android studio,但 gradle 显示以下错误。插件版本为 7.0,Gradle 版本为 7.0.2。此外,我尝试下载到另一个 gradle 版本,但仍然无法完成构建,并且显示相同的错误。
配置根项目“我的应用程序”时出现问题。

Could not resolve all artifacts for configuration ':classpath'.Could not resolve com.android.tools.build:gradle:7.0.0.Required by:project :> Could not resolve com.android.tools.build:gradle:7.0.0.> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.0.0/gradle-7.0.0.pom'.> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.0.0/gradle-7.0.0.pom'.> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.0.2/userguide/build_environment.html#gradle_system_properties> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target> Could not resolve com.android.tools.build:gradle:7.0.0.> Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.0.0/gradle-7.0.0.pom'.> Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.0.0/gradle-7.0.0.pom'.> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.0.2/userguide/build_environment.html#gradle_system_properties> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


它还显示以下错误:
enter image description here

最佳答案

不确定您是否解决了问题。我在 Windows 上通过转到控制面板 -> 网络和 Internet -> Internet 选项 -> 高级,向下滚动并选中/启用“使用 SSL 3.0”来解决它。尝试在 gradle.properties 中添加 https.protocols=SSLv3。

关于java - 无法解析 com.android.tools.build :gradle:7. 0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68608151/

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