当前位置:网站首页>Could not resolve all dependencies for configuration
Could not resolve all dependencies for configuration
2022-07-21 11:48:00 【Bert. King】
Open your mouth and be relaxed , Spontaneous pyrotechnics cold
Android Generally, there will be 1 individual Project Of build.gradle and n individual Module Of build.gradle.
1. Source of problem
MPAndroidChart Integration of , As shown in the figure below :
I made a mistake here today , Cause the above problems :
// Put it here Project Of build.gradle In file
repositories {
maven {
url 'https://jitpack.io' }
}
// Everyone knows that it is placed in Module Of build.gradle In file
dependencies {
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
}
Question 1
Why does it show up Could not resolve all dependencies for configuration The error? ?
First of all, let's take a look at Project Of build.gradle The content of the document :
buildscript {
// Note that there
repositories {
maven {
url 'https://jitpack.io' }
google()
jcenter()
}
...
}
allprojects {
// At the same time, Note that there
repositories {
maven {
url 'https://jitpack.io' }
google()
jcenter()
}
}
We will find that buildscript and allprojects The label contains repositories.
The above error is only in buildscript Add below maven { url ‘https://jitpack.io’ } Caused by .
Question two
buildscript and allprojects Label under repositories What's the difference ?
Usually , Keep both the same .
buildscript yes Gradle Used by itself .
allprojects yes Used by the project module .
For details, please refer to :buildscript and allprojects What are the functions and differences of the Internet ?
2. Solution
Through the above , We get it Project Of build.gradle The composition of the , The solution will naturally appear on the paper …
The safest way is : keep buildscript and allprojects Of repositories The content is consistent .
3. Supplementary content
adopt StackOverFlow Solutions for There are many reasons for finding this problem . I hope this link can help you .
边栏推荐
- 《程序设计基础》 第十章 函数与程序结构 6-4 递归求Fabonacci数列 (10 分)
- 爬虫逆向进阶实战-JS逆向3.6.6 AES链接加密逆向案例
- 关于PCDet的问题:Can not find file kitti_dbinfos_train.pkl
- 支持同花顺的证券公司怎么选择?手机上开户安不安全
- Leetcode突破9W大关
- Wechat applet 23 plays music page
- Samsung announced the completion of the research and development of the 5-nm EUV process: the performance is improved by 10% and the power consumption is reduced by 20%!
- 《程序设计基础》 第十章 函数与程序结构 6-12 有序表的简单增删查操作 (20 分)
- 试着换个角度理解低代码平台设计的本质
- 如何使用 Apache Web 服务器配置多个站点
猜你喜欢
随机推荐
移动边缘计算终端如何赋能高校学习空间智慧管理
Typescript numeric extension use
lotus-bench 1.17.0-rc3 Benchmarks
HTB-Lame
支持同花顺的证券公司怎么选择?手机上开户安不安全
一女子找工作不接受单休遭HR羞辱:我们不是在找小三
Li Kou daily question - day 40 -643 Maximum average number of word groups I
EL&JSTL:EL:部门信息查询、JSTL:部门查询
"Fundamentals of program design" Chapter 10 function and program structure 6-10 recursive factorial sum (15 points)
"Fundamentals of program design" Chapter 10 function and program structure 6-8 recursion for reverse order number (20 points)
《程序设计基础》 第十章 函数与程序结构 6-6 递归实现顺序输出整数 (15 分)
AIX挂载NFS写入效率低的解决方案
Leetcode挺进10W
Disassembly of Huawei P30 Pro: compact structure, fine workmanship, exposure of core device suppliers!
为什么要引入线程?
Uniapp applet adds custom check box style
HTB-Bashed
2021-9-22
2018全球半导体技术发明专利排行榜:京东方杀入前三,华为仅排第59位!
《程序设计基础》 第十章 函数与程序结构 6-13 分治法求解金块问题 (20 分)