添加pickerView依赖后,报错Could not resolve all files for configuration ‘:app:debugCompileClasspath‘.

在build.gradle(.app)添加pickerview的依赖后,build报错Could not resolve all files for configuration ‘:app:debugCompileClasspath’.

报错信息:

在这里插入图片描述
是因为没有引进来pickerview的资源。

解决方法:

在setting.gradle中加入依赖库:

 //阿里云jcenter仓库 包含pickerview
        maven {
    
    url 'https://maven.aliyun.com/repository/jcenter'}
        maven {
    
    
            url 'https://jitpack.io'
        }

这里,我本来加入到build.gradle(.项目)文件中,但和setting.ggradle冲突了,看了这篇文章添加链接描述 然后放到setting.gradle就好了。

猜你喜欢

转载自blog.csdn.net/Qingshan_z/article/details/128237041