Cannot resolve symbol 'FirebaseAuth'

2020-03-03 05:51发布

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.

标签: android
11条回答
Viruses.
2楼-- · 2020-03-03 06:13

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'

查看更多
ゆ 、 Hurt°
3楼-- · 2020-03-03 06:17

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.

查看更多
你好瞎i
4楼-- · 2020-03-03 06:17

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

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

then sync with gradle :)

查看更多
ら.Afraid
5楼-- · 2020-03-03 06:19

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"

查看更多
走好不送
6楼-- · 2020-03-03 06:21

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

查看更多
登录 后发表回答