Could not resolve all artifacts for configuration ‘:classpath‘.

> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find asm-analysis.jar (org.ow2.asm:asm-analysis:7.0).
     Searched in the following locations:
         https://jcenter.bintray.com/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.jar
   > Could not find httpclient.jar (org.apache.httpcomponents:httpclient:4.5.6).
     Searched in the following locations:
         https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.jar
   > Could not find commons-io.jar (commons-io:commons-io:2.4).
     Searched in the following locations:
         https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.jar
   > Could not find gson.jar (com.google.code.gson:gson:2.8.5).
     Searched in the following locations:
         https://jcenter.bintray.com/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar
   > Could not find auto-value-annotations.jar (com.google.auto.value:auto-value-annotations:1.6.2).
     Searched in the following locations:
         https://jcenter.bintray.com/com/google/auto/value/auto-value-annotations/1.6.2/auto-value-annotations-1.6.2.jar
   > Could not find trove4j.jar (org.jetbrains.trove4j:trove4j:20160824).
     Searched in the following locations:
         https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
   > Could not find failureaccess.jar (com.google.guava:failureaccess:1.0.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
   > Could not find j2objc-annotations.jar (com.google.j2objc:j2objc-annotations:1.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar
   > Could not find jaxb-runtime.jar (org.glassfish.jaxb:jaxb-runtime:2.3.1).
     Searched in the following locations:
         https://jcenter.bintray.com/org/glassfish/jaxb/jaxb-runtime/2.3.1/jaxb-runtime-2.3.1.jar
   > Could not find stax-ex.jar (org.jvnet.staxex:stax-ex:1.8).
     Searched in the following locations:
         https://jcenter.bintray.com/org/jvnet/staxex/stax-ex/1.8/stax-ex-1.8.jar

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

 

是因为 引用的地址找不到了。需要添加 

 

buildscript {
    repositories {
        mavenCentral()
        google()
        maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'

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

allprojects {
    repositories {
        mavenCentral()
        google()
        maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        jcenter()
    }
}

 

需要添加 

mavenCentral()

maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'} jcenter()

 

参考 https://www.freesion.com/article/9380325153/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值