自学内容网 自学内容网

【构建|Gradle】Gradle常见使用问题集锦


文章持续更新中。。。

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(<

原文地址:https://blog.csdn.net/seven_zhao/article/details/137991622

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!