我的应用程序有问题...我可以从 GoogleSignInAccount 获取数据...我在 google 中尝试了很多代码来解决它..但结果仍然为空,有人可以帮助我吗?
这是我的代码
GoogleSignInAccount acct = GoogleSignIn.getLastSignedInAccount(MainActivity.this);
if (acct != null) {
String personName = acct.getDisplayName();
String personGivenName = acct.getGivenName();
String personFamilyName = acct.getFamilyName();
String personEmail = acct.getEmail();
String personId = acct.getId();
Uri personPhoto = acct.getPhotoUrl();
txtUser.setText(personName);
txtEmail.setText(personEmail);
Glide.with(MainActivity.this).load(personPhoto).into(imgUser);
}