Android-AS强制刷新/清除Gradle依赖库(转载记录)
2019-08-14 本文已影响3人
MonkeyLei
强制刷新Gradle依赖库缓存(AS打开Terminal执行)
$ gradle build --refresh-dependencies
The --refresh-dependencies option tells Gradle to ignore all cached entries for resolved modules and artifacts. A fresh resolve will be performed against all configured repositories, with dynamic versions recalculated, modules refreshed, and artifacts downloaded.
删除 gradle cache(Window下手动用户下的.gradle/下删除就行,可以只删除对应想更新的依赖,比如C:\Users\xxxx.gradle\caches)
$ rm -rf $HOME/.gradle/caches/
- 原链接 - [Gradle] 如何强制 Gradle 重新下载项目的依赖库
- How can I force gradle to redownload dependencies?
- How to update Gradle dependencies from command line?
- Gradle build doesn't download dependencies
- How to clear gradle cache?
- [Gradle中文教程系列]-跟我学Gradle-5.4:依赖-依赖的更新与缓存
- How do I always use the latest version of a changing module
- 强制Gradle/Maven刷新缓存并重新从Nexus下载依赖jar包
- 理解Maven中的SNAPSHOT版本和正式版本