0
votes

I've a Windows 10 PC running behind ZScaler firewall and which is using a proxy. When I build any project (even basic templates of Android Studio) with Android Studio 3.2.1 I get this error from Gradle (I tried almost everything... without success):

FAILURE: Build failed with an exception.

BUILD FAILED in 42s

2
Are you connected to the internet? If not, try build with internet connected.itsmysterybox
Yes, of course it isSergiob

2 Answers

1
votes

Connect to dl.google.com:443 [dl.google.com/216.58.205.78] failed

As you already mentioned your firewall, you should make sure, that you can reach all required servers.

Beside that, I am a bit confused about gradle 3.20 while your build tools are 3.2.1 which points to the latest android studio version.

Please make sure, that all your versions are set correctly.

1) your build.gradle (project level, not in the app folder)

your build script in the file should look somehow like this: google() repository on position 1

buildscript {
repositories {
    google()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

2) your gradle-wrapper.properties file, located in the gradle\wrapper directory of your project should point to version 4.6, which is current for studio 3.2.1

#Sun Apr 29 08:09:29 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
0
votes

Your Android studio need to be connected to the internet. It needs some resource to be downloaded. Connect your pc with internet then build again.