gpt4 book ai didi

java - Android Studio - 错误 : cannot find symbol class FirebaseAuth

转载 作者:行者123 更新时间:2023-12-02 01:38:00 25 4
gpt4 key购买 nike

我在 Android 中遇到以下错误:

error: cannot find symbol class FirebaseAuth
error: cannot find symbol variable FirebaseAuth
error: cannot find symbol class OnCompleteListener
error: cannot find symbol class AuthResult

我在应用程序中的build.gradle:

implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.google.firebase:firebase-core:16.0.7'

我的项目中的build.gradle:

classpath 'com.google.gms:google-services:4.1.0'

最佳答案

确保您已在项目级别添加 google maven 存储库 -

allprojects {
// ...
repositories {
google() // Google's Maven repository
// ...
}
}

并且,在应用程序级 gradle 文件的底部添加此行 -

apply plugin: 'com.google.gms.google-services'

如果仍然出现错误,请将 Google 服务版本更改为

classpath 'com.google.gms:google-services:4.2.0'

有关详细信息,请访问 Firebase documentation .

关于java - Android Studio - 错误 : cannot find symbol class FirebaseAuth,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54916722/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com