我如何强制gradle重新下载依赖关系? [英] How can I force gradle to redownload dependencies?

查看:603
本文介绍了我如何强制gradle重新下载依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常情况下,您可以使用命令行选项 --refresh-dependencies 。您还可以删除〜/ .gradle / caches 下的缓存文件。下一次构建Gradle将尝试再次下载它们。



您的具体用例是什么?您使用动态依赖版本还是SNAPSHOT版本?






在Unix系统上,您可以删除所有现有的工件(工件和元数据)Gradle已经下载使用:

  rm -rf $ HOME / .gradle / caches / 


How can I tell gradle to redownload dependencies from repositories?

解决方案

Generally, you can refresh dependencies in your cache with the command line option --refresh-dependencies. You can also delete the cached files under ~/.gradle/caches. With the next build Gradle would attempt to download them again.

What is your specific use case? Do you use dynamic dependency versions or SNAPSHOT versions?


On Unix systems, you can delete all the existing artifacts (artifacts and metadata) Gradle has downloaded using:

rm -rf $HOME/.gradle/caches/

这篇关于我如何强制gradle重新下载依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆