首页 > 解决方案 > dl.google.com:443 未能响应

问题描述

得到错误

原因:dl.google.com:443 响应失败

下面是build.gradle文件代码

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}

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' }

标签: androidgradle

解决方案


编辑[user]/.gradle/gradle.properties文件,配置代理,像这样

#systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=1080

推荐阅读