Could not find org.jetbrains.trove4j:trove4j:20160824

一般来说是AS加载各种包或者库时失败导致的,有可能是网络原因。
因此我们更换默认的资源库作为下载源,
在项目的build.gradle中,系统默认提供的是:

buildscript {
    ext.kotlin_version = '1.3.61'
    repositories {
        google()
        jcenter()
    }
}

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

我们替换成如下下载源:

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

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

猜你喜欢

转载自blog.csdn.net/ddnosh/article/details/104079333