Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot resolve symbol 'FirebaseAuth'

Tags:

android

Why am I getting this error? My repository and Google play services are up to date and I've used all the requires steps for using Firebase like copying firebase code in both build.gradle(Project and app). The intellisence doesn't even show FirebaseAuth but displays other members of Firebase.

like image 561
Susen Maharjan Avatar asked Nov 12 '16 04:11

Susen Maharjan


3 Answers

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.

like image 156
pratibhamenon Avatar answered Nov 18 '22 23:11

pratibhamenon


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

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

then sync with gradle :)

like image 12
Muhammad Saad Bhatti Avatar answered Nov 18 '22 23:11

Muhammad Saad Bhatti


Add these 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 the latest android studio version 3.0 and new ones ***

like image 4
Surendrapalsingh Avatar answered Nov 19 '22 00:11

Surendrapalsingh