// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven{ url 'https://maven.aliyun.com/repository/google' }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:5.4.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}allprojects {
    repositories {
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven{ url 'https://maven.aliyun.com/repository/google' }
        jcenter()
    }
}task clean(type: Delete) {
    delete rootProject.buildDir
}
在build.gradle里的依赖如上

解决方案 »

  1.   

    各位dalao有相似情况或者解决办法吗
      

  2.   

    你的AS版本型号是多少 gradle:5.4.1'?
      

  3.   

    gradle的版本改成本地有的
      

  4.   

    直接新建一个项目,或者打开已有项目,对比一下gradle版本,改成能用的那个,5.4.1....真高~
      

  5.   

    版本是3.5.1,但是他在distributionUrl=后面是自动附带的5.4.1并且下载了一个gradle 5.4.1的包
      

  6.   

    我自己下载了一个与版本相同的3.5.1的gradle包,然后设置离线运行指定gradle则会出现
      

  7.   

    你把你发的那个classpath改成3.5.1试试还有google()这个不要删了,估计其他几个镜像仓库都没有5.4.1所以错了    repositories {
            maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
            maven { url 'https://jitpack.io' }
            google()
            jcenter()
        }
      

  8.   

     classpath 'com.android.tools.build:gradle:5.4.1'
    你肯定有gradle:5.4的gradle吗?麻烦换一个稳定的(老一点的)试试