Android问题汇总(遥远的回忆过去)

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/
上一篇下一篇

猜你喜欢

热点阅读