Unable to resolve dependency for app'@debug/compileClasspath':依赖 Open File Show Details————解决方案

android studio 3.1.4 

classpath 'com.android.tools.build:gradle:3.1.4'

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip

compileSdkVersion 27  targetSdkVersion 27  buildToolsVersion '27.0.3'

1. File - Other Setting - Default Setting 

Unable to resolve dependency for app'@debug/compileClasspath':依赖 Open File Show Details————解决方案_第1张图片

2.File - Setting

Unable to resolve dependency for app'@debug/compileClasspath':依赖 Open File Show Details————解决方案_第2张图片

Unable to resolve dependency for app'@debug/compileClasspath':依赖 Open File Show Details————解决方案_第3张图片

3. 如下图

Unable to resolve dependency for app'@debug/compileClasspath':依赖 Open File Show Details————解决方案_第4张图片

Unable to resolve dependency for app'@debug/compileClasspath':依赖 Open File Show Details————解决方案_第5张图片
4.如下图

buildscript {

    repositories {
        mavenCentral()
        jcenter()
        google()
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenCentral()
        jcenter()
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        maven { url "https://jitpack.io" }
        maven { url "https://maven.google.com" }
        google()
    }
}

5.选择性参考,告辞

gradle下载:http://services.gradle.org/distributions/   (C:\Users\Zian\.gradle\wrapper\dists)

实用链接

你可能感兴趣的:(android)