我正在尝试使用该createUserWithEmailAndPassword方法来创建用户但不能这样做.正在调用OnAuthenticate方法,但用户对象为null,并且没有在firebase控制台内创建用户.这是我的代码,也是在线提供的代码.
MAinActivity.java
private static FirebaseAuth mAuth;
private static FirebaseAuth.AuthStateListener mAuthListener;
private static String TAG = "RegisterDEbug";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.activity_main);
mAuth = FirebaseAuth.getInstance();
mAuthListener = new FirebaseAuth.AuthStateListener() {
@Override
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
waitForDebugger();
FirebaseUser user = firebaseAuth.getCurrentUser();
if (user != null) {
// User is signed in
Log.d(TAG, "onAuthStateChanged:signed_in:" + user.getUid());
} else {
// User is signed out
Log.d(TAG, "onAuthStateChanged:signed_out");
}
// ...
}
};
mAuth.addAuthStateListener(mAuthListener);
mAuth.createUserWithEmailAndPassword("9199999989@pintech.com", "corrfecthorsebatterystaple")
.addOnCompleteListener(this, new …Run Code Online (Sandbox Code Playgroud)