Getting error when trying to fAuth = FirebaseAuthException.getInstance();
public class Register extends AppCompatActivity {
FirebaseAuthException fAuth;
FirebaseDatabase db;
DatabaseReference users;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
fAuth = FirebaseAuthException.getInstance();
}
}
It looks like you should be using FirebaseAuth
instead of FirebaseAuthException
. Use FirebaseAuth.getInstance()
to obtain a reference to the FirebaseAuth
object to then make subsequent calls like createUserWithEmailAndPassword()
on.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.