After update classpath 3.5.0. to 3.5.1

1.1k Views Asked by At

Upgrade Gradle build tools to the latest version then this issue occurs. Could not resolve all artifacts for configuration ': classpath'.

Could not resolve com.android.tools.build:gradle:3.5.1. Required by: project : Could not resolve com.android.tools.build:gradle:3.5.1. Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.1/gradle-3.5.1.pom'. Could not HEAD 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.1/gradle-3.5.1.pom'. Remote host closed connection during handshake

4

There are 4 best solutions below

2
On BEST ANSWER

Here is the possible reason,

1) Check your internet connection, if it works then,

2) Check that your firewall, because if some of the Google Service blocks at that time also you get an exception.

3) Invalid cache and restart Android Studio.

Hops this helps.

0
On

Try this in Android Studio

Settings -> Build -> Gradle -> Android Studio -> Enable embedded maven repository
0
On

In app level gradle file, add following

repositories {
        google()
        jcenter()
}
0
On

I was able to solved this error in our school where we used network "proxy" settings. The error is always [Could not resolve all artifacts for configuration ':classpath'.] from old version of Android Studio SDK even the new one 3.6.1. Below are the steps I made and hope it will be of great help to you guys: 1. Check your Network Settings -> Proxy -> Use a Proxy Server (TURN IT OFF) 2. Check Control Panel\Network and Internet\Network Connections -> Ethernet Properties -> IPV4 Properties -> Change to obtained (or you set it with your common network IP) 3. Open the file gradle.properties location C:\Users\.gradle\ and remove all the settings related to "proxy" which makes the Android error in classpath. Thats it.