文章目录
-
- 1. 更新Gradle仓库或者迁移本地Maven仓库后报错
- 2. Gradle配置使用mavenLocal()后,假如添加新的依赖,在Maven仓库中不可见
- 3. 取消使用idea+Gradle创建项目时自动生成.main结尾的子module
文章持续更新中。。。
1. 更新Gradle仓库或者迁移本地Maven仓库后报错
错误信息:If the artifact you are trying to retrieve can be found in the repository but without metadata in ‘Maven POM’ format, you need to adjust the ‘metadataSources { … }’ of the repository declaration.
原因:这是由于多模块构建后,会在根目录下形成临时文件,依赖库迁移后对应的临时文件索引没有删除导致的
解决方案:
# 在根目录下 build.gradle中添加如下内容(这个内容归属于all projects)
task clean(<