[英]GoogleSignInAccount return null when use app Bundle in Google play
I want to use Google login in my application When I get the APK output, there is no problem and the program works easily But when I load the program with the bundle output on the Google console, after installing and logging in and selecting the Google account, it returns a null output.我想在我的应用程序中使用谷歌登录当我得到 APK output 时,没有问题,程序很容易运行但是当我在谷歌控制台上使用捆绑包 output 加载程序时,安装并登录并选择谷歌帐户后,它返回一个 null output。 I did not use Proguard either
我也没有使用 Proguard
GoogleSignInOptions gso =
new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(Setting.GetGoogleClientId())
.requestEmail()
.build();
After choosing the email, this value becomes null:选择email后,这个值变成null:
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == CALL_GOOGLE)
{
Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
GoogleSignInAccount account = task.getResult(ApiException.class);
// account or account.getEmail() is null
}
}
Get sha1 code from Google Play Console and fix!从 Google Play 控制台获取 sha1 代码并修复!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.