无法解析符号'FirebaseAuth'

Sus*_*jan 6 android

为什么我收到此错误?我的存储库和Google Play服务是最新的,我已经使用了Firebase的所有必需步骤,比如在build.gradle(Project和app)中复制firebase代码.intellisence甚至不显示FirebaseAuth,但显示Firebase的其他成员.

小智 18

通过将此添加到build.gradle文件(对于应用程序)解决了错误 -

implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
Run Code Online (Sandbox Code Playgroud)

第二个依赖是解决版本冲突错误.


Muh*_*tti 12

将此依赖项添加到Gradle.Build(模块:应用程序)

compile "com.google.firebase:firebase-auth:9.0.2"
Run Code Online (Sandbox Code Playgroud)

然后与gradle同步:)