Android Studio handles SNAPSHOT dependencies

I'm having problems using the SNAPSHOT dependency on Android Studio 3.0.1. I also tried Android Studio 3.1, and the same problem remains.

I include the dependency as follows:

dependencies { configurations.all { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' } implementation('com.example:lib:0.0.1-SNAPSHOT') { changing = true } } 

When a new version of the library is released, if I click the "Update All Gradle" icon, the application will be obstinate. However, Android Studio does not see the changes made in the snapshot.

I already tried to restart Android Studio and invalidate its cache without any differences.

How to get Android Studio to know about the changes?

+5
source share
2 answers

I have the same problem. So far, what works for me is to update the dependencies via the command line:

 ./gradlew clean --refresh-dependencies 

After that, close AS completely and open it again. I will update my answer if I find anything else.

+3
source

This is a bug in studio 3.1 -> https://issuetracker.google.com/issues/72614343

Fixed in latest version of Canary (3.2)

+1
source

Source: https://habr.com/ru/post/1274615/


All Articles