请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Could not find com.android.tools.build:3.6.2:. Required by:

背景介绍: Gradle 5.4.1!
Here are the highlights of this release:

  • Run builds with JDK12

Kotlin: 1.3.21
Groovy: 2.5.4
Ant: Apache Ant™ version 1.9.13 compiled on July 10 2018
JVM: 13 (Oracle Corporation 13+33)
OS: Windows 10 10.0 amd64
开发工具:AS 3.5.2
编写的代码如下:
build.gradle.kts

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    val kotlin_version="'1.3.71"
    val gradle_version="3.6.2"
    repositories {
        google()
        jcenter()
        
    }
    dependencies {
        classpath ("com.android.tools.build:$gradle_version")
        classpath ("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")

    }
}

allprojects {
    repositories {
        google()
        jcenter()
        
    }
}
tasks{
    val clean by registering(Delete::class){
        delete(buildDir)
    }
}


sync之后提示

Could not find com.android.tools.build:3.6.2:.
Required by:
    project :
Search in build.gradle files

正在回答 回答被采纳积分+3

1回答

刘某人 2021-12-01 12:16:02

Could not find com.android.tools.build:3.6.2:.

这个可以用

maven { url 'https://maven.aliyun.com/repository/jcenter' }


阿里的镜像


0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信