首页 文章

Gradle sync失败:找不到com.android.tools.build:gradle:3.0.1

提问于
浏览
2

我的Android Studio项目没有加载这是问题所在:

找不到com.android.tools.build:gradle:3.0.1 . 在以下位置搜索:https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom https://jcenter.bintray.com/com/android /tools/build/gradle/3.0.1/gradle-3.0.1.jar

而我的build.gradle是:

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


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

}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

请帮帮忙,谢谢

1 回答

  • 2

    尝试将 jcenter() 替换为存储库中的 google() ,并将build.gradle中的allprojects->存储库块替换为

相关问题