Google登录:登录指定帐户时出错.请选择其他帐户 [英] Google Signin:Error signing in the specified account. Please choose a different account

查看:150
本文介绍了Google登录:登录指定帐户时出错.请选择其他帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题已经问过了,但是我没有找到满意的答案.

This question already asked but I did not find any satisfactory answer.

我遵循了 https:/的每一步/developers.google.com/+/mobile/android/samples/quickstart-android#credentials-screenshot ,但我使用的不是我的软件包名称.

I followed each and every step of https://developers.google.com/+/mobile/android/samples/quickstart-android#credentials-screenshot but instead of their package name I am using mine.

有两种情况,一种是直接测试,另一种是在使用密钥库登录apk之后.

There are two cases one is direct testing and one after signin the apk with keystore.

在这种情况下,当我测试我的应用时,任何Google帐户都可以正常运行,但是生成signed apk后,它给了我Error signing in the specified account. Please choose a different account.

When I am testing my app in that case signin with any google account working fine but after I generate my signed apk it is giving me Error signing in the specified account. Please choose a different account.

如果所有内容都相同,那么为什么它不能与signed apk一起使用?

If everything is same then why it is not working with signed apk?

推荐答案

我发现了我的错误,它是SHA1密钥,我的调试SHA1和密钥库SHA1不同,在Google控制台中,我给了我的调试SHA1,所以它可以与调试一起使用apk,但没有签名的apk.

I found my mistake and it is SHA1 key, My debug SHA1 and keystore SHA1 are different and in google console I gave my debug SHA1 so it was working with debug apk but not with signed apk.

所以我所做的是我从密钥库中提取了SHA1,并将其放在Google控制台中,现在可用于已签名的apk(现在无法与调试一起使用). 这是从密钥库中提取SHA1的方式.

So what I did is I extracted SHA1 from my keystore and put that in google console now it is working for signed apk(it will not work with debug now). This is how you can extract SHA1 from keystore.

c:\Program Files\Java\jdk1.7.0_71\bin>keytool -list -v -keystore c:\you_key_here.key

这篇关于Google登录:登录指定帐户时出错.请选择其他帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆