With Gradle? That seems unusual as it is very good at tracking dependencies. Perhaps because maven local is involved, too? Maybe it's not as good with that, although I've been fortunate, and don't recall that happening with more recent (4+) versions.
But as a fall-back, yes, a manual refresh can be triggered using --refresh-dependencies, rather than having to delete things in your cache.