In my fragment java class there is an error coming in the getLastSignedInAccount in "this" statement following is the code:
GoogleSignedInAccount signInAccount = GoogleSignIn.getLastSignedInAccount(this);
if(signInAccount != null){
name.setText(signInAccount.getDisplayName());
mail.setText(signInAccount.getEmail());
}