Another workaround is to delete the ~/.gradle/caches and then sync the project in Android Studio. This is not ideal, since all your dependencies need to be reloaded, but it is a little less intrusive, which will re-import the project into AS, as @Joe pointed out.
Terminal: rm -rf ~ / .gradle / caches AS: Tools> Android> Sync project with Gradle files (or click the "Sync Project with the Gradle Files button" button)
EDIT
A few more studies and found this little stone .
Just set up your dependency as such ...
compile ('groupId:artifactId:XXX-SNAPSHOT'){ changing=true }
Then just run gradle clean assemble in a project that has a SNAPSHOT dependency.
I tried to check if the new added constant became available, and of course it worked.
source share