错误:找不到com.android.tools.build:gradle:3.5.2 [英] ERROR: Could not find com.android.tools.build:gradle:3.5.2

查看:346
本文介绍了错误:找不到com.android.tools.build:gradle:3.5.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ERROR: Could not find com.android.tools.build:gradle:3.5.2.
Searched in the following locations:
  - 

https://jcenter .bintray.com/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.pom - https://jcenter .bintray.com/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.jar 要求者: 项目 : 打开文件

https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.jar - https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.pom - https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.2/gradle-3.5.2.jar Required by: project : Open File

ext {
    var = '3.5.2'
   var1 = '3.5.2'
}// 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.5.2'

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

allprojects {
     repositories {
        google()
        jcenter()

    }
}

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

我们在运行项目时从android studio中收到了此错误 我们使用了在线和离线模式,但是它们并不能正常工作 这个错误使我感到困惑

we recived this error from my android studio when run my projects we used online and offline mod but they not worked corectly This error has confused me

以下代码与包装器有关

ext {
var = '3.5.2'
var1 = '3.5.2'
}// 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.5.2'

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

allprojects {
    repositories {
        google()
        jcenter()

    }
}

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

推荐答案

我在Linux(ubuntu)上也遇到了这个问题

I also had this problem on Linux (ubuntu)

我尝试了不同的方法,但是问题仍然没有解决.

I tried different ways but the problem still didn't work out.

最后,我删除 /home/(user)/.gradle目录并重新启动Android Studio,此错误已解决.

Finally, I remove /home/(user)/.gradle directory and restart Android Studio and this error fixed.

这篇关于错误:找不到com.android.tools.build:gradle:3.5.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆