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.
-
Refer to this : [FireBase StackOver Flow Config](http://stackoverflow.com/questions/40428477/class-extending-firebasemessagingservice-not-working-inside-android-library/40429161#40429161) – Soheil Tayyeb Nov 12 '16 at 04:41
-
Try this one http://stackoverflow.com/a/37383139/4608334 – Vinoth Vino Dec 12 '16 at 02:16
13 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.

- 7,009
- 4
- 25
- 38

- 363
- 2
- 8
Add this dependency to Gradle.Build(Module:App)
compile "com.google.firebase:firebase-auth:9.0.2"
then sync with gradle :)

- 243
- 4
- 12
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 ***

- 7,009
- 4
- 25
- 38

- 43
- 6
add the following to the build.gradle (app)
implementation 'com.google.firebase:firebase-auth:9.2.1'

- 86
- 3
Solved the error by adding this to the build.gradle file(for app) -
compile 'com.google.firebase:firebase-auth:9.2.1'
compile "com.google.android.gms:play-services-gcm:9.2.1"

- 27,874
- 70
- 431
- 719

- 11
- 5
For me this worked with all the firebase extensions:
eg.:
Android studio adds the following line to your gradle file:
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
You have to change it to:
implementation 'com.google.firebase:firebase-auth:16.0.1'
and add:
kapt 'com.google.firebase:firebase-auth:16.0.1:15.0.0'

- 33
- 4
I have android studio 3.3.1 installed. Compile is replaced with implementation. So you have to write
implementation 'com.google.firebase:firebase-auth:16.1.0'
You should replace version according to the warning you get.
on dependencies in app gradle
implementation 'com.google.firebase:firebase-core:16.0.1' implementation 'com.google.firebase:firebase-auth:16.0.1'
this is useful android 3.0 and onwards versions auth:16.0.1 and core:16.0.1Firebase will work
implementation 'com.google.firebase:firebase-auth:16.0.1'
make sure your firebase and all the dependency are the same versions.

- 7,009
- 4
- 25
- 38

- 209
- 3
- 4
-
@HansHirse make sure your firebase all the dependency are same version – sumit baflipara Apr 24 '19 at 05:54
In my case, I was using firebase-auth and firebase-messaging with different versions. So After getting an error I kept the same version for both e.g.
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
After sync, my problem was solved. try to keep the version the same for firebase libraries

- 7,009
- 4
- 25
- 38

- 1,299
- 2
- 10
- 9
Please add the below line in your build.gradle
file:
implementation 'com.google.firebase:firebase-auth:19.3.0'
implementation "com.google.android.gms:play-services-gcm:10.2.1"

- 7,009
- 4
- 25
- 38

- 1
- 1
You may need to make sure that your activity is importing the Firebase Auth module. In your .java file (eg. Login.java):
import com.google.firebase.auth.FirebaseAuth;

- 7,009
- 4
- 25
- 38

- 31
- 1
- 2