Could not find gradle:3.0.0 解决Could not find com.android.tools.build:gradle:3.0.0

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

Could not find gradle:3.0.0 解决Could not find com.android.tools.build:gradle:3.0.0

CR7Z   2021-08-19 我要评论
想了解解决Could not find com.android.tools.build:gradle:3.0.0的相关内容吗,CR7Z在本文为您仔细讲解Could not find gradle:3.0.0的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:gradle:3.0.0,Could,not,find,com.android.tools.build:gradle:3.0.0,下面大家一起来学习吧。

android studio升级3.0,gradle升级4.1以后项目报错,如下

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 :* Try:
Run with –stacktrace option to get the stack trace. Run with –debug option to get more log output.

解决方法:在project的builde.gradle做如下操作分别加上google()

buildscript {

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


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

allprojects {
    repositories {
        google()
        .....
    }
}

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们