gradle项目 Could not find xxx.jar. Searched in the following locations: 问题的解决

项目中使用assertj-generator-gradle-plugin

参考:https://github.com/assertj/assertj-generator-gradle-plugin

于是

sourceSets {
    main {
        // must specify assertJ block to have it applied
        assertJ { }
    }
}

在buildscript block中加入了gradle aliyun repository

gradle项目 Could not find xxx.jar. Searched in the following locations: 问题的解决_第1张图片

仍旧是下载不下来,并且项目stuck in refresh gradle project

最后将buildscript中的repositories设置为jcenter,

并且将之前下载的部分不完全的仓库内容删除掉

本地仓库地址

D:\.gradle\caches\modules-2\files-2.1\org.assertj\assertj-assertions-generator\2.0.0

总算把这个jar下载下来了

 

但是之后下载google guava jar又超时了

于是将buildscript中的repositories全部注释掉,

并在

gradle项目 Could not find xxx.jar. Searched in the following locations: 问题的解决_第2张图片

中使用gradle aliyun repository,终于项目refresh成功

你可能感兴趣的:(构建工具)