Gradle failed to resolve library in Android Studio
You go File->Settings->Gradle Look at the "Offline work" inbox, if it's checked u uncheck and try to sync again I have the same problem and i try this , the problem resolved. Good luck !
I had the same problem, the first thing that came to mind was repositories. So I checked the build.gradle
file for the whole project and added the following code, then synchronized the gradle with project and problem was solved!
allprojects {
repositories {
jcenter()
}
}