简体   繁体   English

无法解析 com.android.tools.build:gradle:7.0.0

[英]Could not resolve com.android.tools.build:gradle:7.0.0

I have just installed android studio but the gradle show's below error.我刚刚安装了 android studio,但 gradle 显示以下错误。 The plugin version is 7.0 and Gradle Version is 7.0.2.插件版本为 7.0,Gradle 版本为 7.0.2。 Moreover, I tried to download to another gradle version but still can't complete the build and it shows the same error.此外,我尝试下载到另一个 gradle 版本,但仍然无法完成构建并显示相同的错误。

A problem occurred configuring root project 'My Application'.配置根项目“我的应用程序”时出现问题。

Could not resolve all artifacts for configuration ':classpath'.无法解析配置 ':classpath' 的所有工件。 Could not resolve com.android.tools.build:gradle:7.0.0.无法解析 com.android.tools.build:gradle:7.0.0。 Required by: project : > Could not resolve com.android.tools.build:gradle:7.0.0.要求:项目:> 无法解析 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'. > 无法获取资源“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'. > 无法获取“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). > 服务器可能不支持客户端请求的 TLS 协议版本:(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.请参阅: https ://docs.gradle.org/7.0.2/userguide/build_environment.html#gradle_system_properties > PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径 > 可以无法解析 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'. > 无法获取资源“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'. > 无法获取“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). > 服务器可能不支持客户端请求的 TLS 协议版本:(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请参阅: https ://docs.gradle.org/7.0.2/userguide/build_environment.html#gradle_system_properties > PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径

It also shows below error:它还显示以下错误: 在此处输入图片说明

not sure if you solved the problem.不知道你是否解决了问题。 I solved it on Windows by going to Control Panel -> Network and Internet -> Internet Options -> Advanced, scroll down and check/enable "Use SSL 3.0".我通过转到控制面板 -> 网络和 Internet -> Internet 选项 -> 高级,向下滚动并选中/启用“使用 SSL 3.0”在 Windows 上解决了它。 Try also adding https.protocols=SSLv3 in gradle.properties.也尝试在 gradle.properties 中添加 https.protocols=SSLv3。

Necesito ayuda, me paso exactamente este mismo problema y estoy hace mas de una semana sin poder resolverlo!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM