If you are upgraded to Android Studio 2.2.2 and using lower version liberary of firebase then you might face the error Failed to resolve: com.google.firebase:firebase-messaging:9.0.0 , Error:(39, 13) Failed to resolve: com.google.firebase:firebase-analytics:9.0.0 Error:(38, 13) Failed to resolve: com.google.firebase:firebase-core:9.0.0 The solution of this is the error is to change the library version to latest version of firebase(9.6.0) in your build.gradle file. Make sure to all other dependency and android plugin are also up to date. compile 'com.google.firebase:firebase-ads:9.6.0' compile 'com.google.firebase:firebase-core:9.6.0' compile 'com.google.firebase:firebase-analytics:9.6.0' compile 'com.google.firebase:firebase-messaging:9.6.0' After adding the dependency to the latest version click on sync project. There may be the issue with google repository so install the latest repository as given in below screen shots. If it is resolve...