Android Studio3.1.2 build.gradle classpath参数报错

新建或者导入项目的时候,报错如下:

Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'. Received status code 400 from server: Bad Request
Enable Gradle 'offline mode' and sync project

Android Studio3.1.2 build.gradle classpath参数报错_第1张图片但是检查了本地文件,gradle3.1.2是存在的,不知道为什么不从本地拿?

Android Studio3.1.2 build.gradle classpath参数报错_第2张图片

build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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
}

你可能感兴趣的:(Android Studio3.1.2 build.gradle classpath参数报错)