7

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.

Susen Maharjan
  • 105
  • 1
  • 1
  • 10
  • 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 Answers13

22

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.

Ramesh R
  • 6,683
  • 3
  • 22
  • 34
pratibhamenon
  • 353
  • 2
  • 8
12

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

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

then sync with gradle :)

4

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

1

Same problem. Clean your project with "Build"->"Clean Project".

1

add the following to the build.gradle (app)

implementation 'com.google.firebase:firebase-auth:9.2.1'
0

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"
Fattie
  • 35,446
  • 61
  • 386
  • 672
0

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'

0

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.

0

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

0

implementation 'com.google.firebase:firebase-auth:16.0.1'

make sure your firebase all the dependency are same version

sumit baflipara
  • 159
  • 2
  • 4
0

In my case, I was using firebase-auth and firebase-messaging with different versions. So After getting error I kept 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 solved. try to keep version same for firebase libraries

Prathamesh Gujar
  • 1,279
  • 2
  • 10
  • 9
0

Please add 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"
David Buck
  • 3,594
  • 33
  • 29
  • 34
0

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;