Getting error
Cause: dl.google.com:443 failed to respond
Below is the build.gradle
file code
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}}allprojects {
repositories {
google()
jcenter()
}}task clean(type: Delete) {
delete rootProject.buildDir}
and
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' }
edit [user]/.gradle/gradle.properties file, config proxy, like this
#systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=1080
Please try
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.1.0' }
in your gradle. hope it will help you.
I am an android developer from China, I met the same problem as you. This problem is mostly because I am behind a proxy. So there are two steps that may help you.
File->Settings->Appearance&Behavior -> System Settings -> HTTP Proxy
Then select No proxy option
Locate gradle.properties
file in .gradle
directory (this directory is generally in The User directory) and edit it. Delete every line about HTTP Proxy. Mine is like this
systemProp.https.proxyPort=1080
systemProp.http.proxyHost=127.0.0.1
systemProp.https.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With