They were changing and deleting old libraries, I guess.
I finally managed to get it working, by changing the order of repositories in project build.gradle:
allprojects { repositories { google() maven { url "https://maven.google.com" // Google's Maven repository } jcenter() } }
jcenter should be the last.