这可能是因为您正在使用过时的Firebase版本或未正确导入Firebase Auth库。请按照以下步骤解决此问题:
dependencies {
implementation 'com.google.firebase:firebase-auth:19.2.0'
}
import com.google.firebase.auth.FirebaseAuth;
对于Android Studio 3.0及更高版本,请转到File > Invalidate Caches / Restart,并选择“Invalidate and Restart”选项。
确保您已在Firebase控制台中正确设置了您的应用程序,并已在项目中添加了Firebase配置文件。
最后,删除您的应用程序的build文件夹,重新构建您的项目。
这些步骤应该能够解决您的问题,使Firebase Auth库中的方法得以正确解析。