找不到com.android.tools.build:gradle:2.2.3

时间:2017-08-16 01:08:08

标签: android sdk android-gradle

您好我正在关注Udacity的材料设计课程,当我下载他们在课程中提供的代码但是当我在Android中打开它时它给了我那个错误

Error:Could not find com.android.tools.build:gradle:2.2.3.
Searched in the following locations:
    https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom
    https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar
Required by:
    :ApplyPaletteDemo:unspecified

1 个答案:

答案 0 :(得分:0)

检查项目的build.gradle文件是否与您的Android Studio版本匹配。该项目可能是为旧版Android Studio编写的。

    buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven{
            url "http://maven.google.com"
        }
    }
}