码迷,mamicode.com
首页 > 移动开发 > 详细

在用Android StudioBuild项目时,提示:Could not resolve all files for configuration ':classpath'.Could not find com.android.tools.

时间:2021-02-03 11:01:45      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:tools   gradle   链接   uil   osi   cat   err   href   script   

在用Android StudioBuild项目时,提示:Could not resolve all files for configuration ‘:classpath‘.Could not find com.android.tools.

Error:Gradle: A problem occurred configuring root project MyApplication.
> Could not resolve all files for configuration :classpath.
   > Could not find com.android.tools.build:gradle:3.0.0.
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
         https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
     Required by:
         project :

解决办法:

修改Project的build.gradle(注意:不是App的build.gradle),两处加上google(),如下所示:

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

allprojects {
    repositories {
        jcenter()
        google()
    }
}

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

原文链接:

1、Could not resolve all files for configuration ‘:classpath‘.Could not find com.android.tools.

2、Declaring repositories

在用Android StudioBuild项目时,提示:Could not resolve all files for configuration ':classpath'.Could not find com.android.tools.

标签:tools   gradle   链接   uil   osi   cat   err   href   script   

原文地址:https://www.cnblogs.com/rainbow70626/p/14364492.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!