如题所述
第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()
}
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()
}