Could not resolve com.android.tools.build:gradle:7.0.0
Asked Answered
P

1

7

I have just installed android studio but the gradle show's below error. The plugin version is 7.0 and Gradle Version is 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.

A problem occurred configuring root project 'My Application'.

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

It also shows below error: enter image description here

Pemmican answered 1/8, 2021 at 6:58 Comment(0)
H
-1

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". Try also adding https.protocols=SSLv3 in gradle.properties.

Hurwit answered 5/9, 2021 at 0:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.