当前位置: 首页 > 知识库问答 >
问题:

AS 3.1.3 Gradle-4.1-all.zip找不到com.android.tools.build:Gradle:3.0.1

冀萧迟
2023-03-14

build.gradle文件内容:

// 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'
        classpath 'com.novoda:bintray-release:0.8.1'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
    }
}
allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        google()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
ext {
    compileSdkVersion = 26
    buildToolsVersion = "26.0.2"
    minSdkVersion = 16
    targetSdkVersion = 26

    lib_appcompat_v7 = 'com.android.support:appcompat-v7:26.1.0'
    lib_support_v4 = 'com.android.support:support-v4:26.1.0'
    lib_support_design = 'com.androdi.support:design:26.1.0'
}

同步失败。错误如下:

共有1个答案

徐欣德
2023-03-14
// 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.0.1'
        classpath 'com.novoda:bintray-release:0.8.1'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
    }
}
allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
ext {
    compileSdkVersion = 26
    buildToolsVersion = "26.0.2"
    minSdkVersion = 16
    targetSdkVersion = 26

    lib_appcompat_v7 = 'com.android.support:appcompat-v7:26.1.0'
    lib_support_v4 = 'com.android.support:support-v4:26.1.0'
    lib_support_design = 'com.androdi.support:design:26.1.0'
}
 类似资料: