Cannot resolve symbol 'FirebaseAuth'

Solved the error by adding this to the build.gradle file(for app) -

implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'

The 2nd dependency is to solve the version conflict error.


Add this dependency to Gradle.Build(Module:App)

compile "com.google.firebase:firebase-auth:9.0.2"

then sync with gradle :)


Add this two dependencies into your build.gradle as 'compile' is replaced by 'implementation'

dependencies {

implementation 'com.google.firebase:firebase-auth:16.0.4'
implementation "com.google.android.gms:play-services-gcm:16.0.0"

}

For latest android studio version 3.0 and new one's

@androidstudio @firebase

Tags:

Android