Could not resolve all dependencies for configuration ':XXX:_debugCompile'

如题所述

第1个回答  2022-07-04
报错提示:

Error:A problem occurred configuring project ‘:XXX’.

Could not resolve all dependencies for configuration ‘:XXXXX:_debugCompile’.

Could not find com.X.X:X.

Searched in the following locations:

报错原因:

Gradle加载库文件失败

自己的方案:

由于自己关联的库文件是关联jcenter的,因此在对应module下的gradle文件中添加

repositories {

    jcenter()

}

1

2

3

即可,倘若你的项目的依赖包是关联maven的,那么在对应module下的gradle文件中添加:

1

repositories {

    mavenCentral()

}

1

2

3

最保险的是同时加:

repositories {

    jcenter()

}

repositories {

    mavenCentral()

}

相关了解……

你可能感兴趣的内容

大家正在搜

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网