Google登录无法获取令牌

时间:2015-11-21 00:27:16

标签: android google-api

我已按照https://developers.google.com/identity/sign-in/android/start-integrating所述将Google登录整合到应用中。使用https://developers.google.com/identity/sign-in/android/sign-in?configured作为模型,我使用调试密钥库正确登录。

当我合并拉取请求并尝试将配置切换为发布版本的新密钥库时,登录过程开始莫名其妙地失败。通过一些挖掘,我在New Google sign in Android找到了相同的错误。

Status{statusCode=unknown status code: 12501, resolution=null}

这些帖子让我相信也许我错误地配置了键。但是,在多次检查并多次创建新的密钥库和配置文件之后,错误仍在继续。我还手动检查了签署我的发布APK的密钥库的RSA1。这是在Google注册的。最后,我注意到日志中有一些错误

W/SurfaceFlinger﹕ couldn't log to binary event log: overflow.
W/AccountChipsFragment﹕ Recording consent failed.
V/GLSActivity﹕ AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
V/GLSActivity﹕ AuthDelegateWrapperCreated with selected intent: Intent { cmp=com.google.android.gms/.auth.DefaultAuthDelegateService }
D/ConnectivityService﹕ updateNetworkScore for NetworkAgentInfo [WIFI () - 106] to 59
D/ConnectivityService﹕ rematching NetworkAgentInfo [WIFI () - 106]
V/BaseAuthAsyncOperation﹕ access token request failed

1 个答案:

答案 0 :(得分:0)

事实证明,我联系的答案中的建议是正确的。问题是我用来将服务器客户端ID注入构建的方法用于调试,但是错误导致它在发布版本中失败,所以我的服务器客户端ID实际上是空的。