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条回答
家丑人穷心不美
2楼-- · 2020-03-03 05:54

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

make sure your firebase all the dependency are same version

查看更多
手持菜刀,她持情操
3楼-- · 2020-03-03 05:55

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.

查看更多
Bombasti
4楼-- · 2020-03-03 05:59

add the following to the build.gradle (app)

implementation 'com.google.firebase:firebase-auth:9.2.1'
查看更多
兄弟一词,经得起流年.
5楼-- · 2020-03-03 05:59

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

查看更多
Deceive 欺骗
6楼-- · 2020-03-03 06:04

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

查看更多
SAY GOODBYE
7楼-- · 2020-03-03 06:08

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

查看更多
登录 后发表回答