0

There was no error resolving com.google.firebase:firebase-core:16.0.1 and com.google.firebase:firebase-auth:16.0.2. Any suggestions?

Barath R
  • 199
  • 3
  • 12

1 Answers1

8

Try adding google() repo in top level gradle file :

buildscript {
// ...
dependencies {
// ...
classpath 'com.google.gms:google-services:4.0.1' // google-services 
plugin
  }
}

allprojects {
   // ...
   repositories {
   // ...
   google() // Google's Maven repository
 } 
}
Sahil
  • 952
  • 1
  • 7
  • 14
  • 1
    I already had added Google's Maven repository, but didn't use the latest version of Google play services. Thanks! – Barath R Jul 04 '18 at 07:22
  • @BarathR Yes, that was the issue here. I don't know why there is not a clear error message for this. And why not Android Studio try to update version in gradle file after installing the latest version. – Karan Jul 09 '18 at 21:02
  • 1
    version mentioned in answer. you may accept it. – Sahil Jul 10 '18 at 02:45