Could not resolve all dependencies for configuration ':classpath'

后端 未结 23 1481
离开以前
离开以前 2020-12-01 04:27

I cant seem to get build tools for the latest gradle at all. I suspect its something to do with proxy setting for gradle. I have had a good look online but still cant seem t

23条回答
  •  时光说笑
    2020-12-01 04:36

    For newer android studio 3.0.0 and gradle update, this needed to be included in project level build.gradle file for android Gradle build tools and related dependencies since Google moved to its own maven repository.

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
        repositories {
            jcenter()
            google()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.1'
    
            // NOTE: Do not place your application dependencies here; they belong
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            google()
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    

提交回复
热议问题