'How to solve this issue for Googles Authentication with Firebase?

In Firebase Authentication with Google getCredential(acct.getIdToken(), null) in FireAuthWithGoogle method is not working.

when I place cursor on (acct.getIdToken(), null) it says getCredential() in 'android.net.wifi.hotspot2.passpointConfiguration' cannot be applied to 'java.lang.string, null'.

Someone please Answer why its not working though it is correct.Sorry I cannot write entire Code but This is the only problem in my code. This is my Code.

private void FirebaseAuthWithGoogle(GoogleSignInAccount acct){
 AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
        mAuth.signInWithCredential(credential).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if(task.isSuccessful()){
                    Toast.makeText(LoginActivity.this, "SignIn failed", Toast.LENGTH_SHORT).show();
                    FirebaseUser user = mAuth.getCurrentUser();
                    updateUI(user);
                }
                else{
                    Toast.makeText(LoginActivity.this, "failed", Toast.LENGTH_SHORT).show();
                    updateUI(null);
                }
            }
        });

    }             


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source