Android的 - GoogleSignInResult总是失败 [英] Android - GoogleSignInResult always failing
问题描述
我在这里跟着教程:
https://developers.google.com/identity/sign-in/android /启动整合
整合谷歌登录到我的应用程序。
I have followed the tutorial here: https://developers.google.com/identity/sign-in/android/start-integrating to integrate Google sign in into my app.
但是, GoogleSignInResult.isSuccess()
永远是假的。 <$c$c>GoogleSignInStatus$c$cs.getStatus$c$cString(googleSignInResult.getStatus().getStatus$c$c())$c$c>节目 INTERNAL_ERROR
。该文档<一个href=\"https://developers.google.com/android/reference/com/google/android/gms/common/api/CommonStatus$c$cs.html#INTERNAL_ERROR\"相对=nofollow>这里说的重试应该解决的问题,但事实并非如此。
However, the GoogleSignInResult.isSuccess()
is always false. GoogleSignInStatusCodes.getStatusCodeString(googleSignInResult.getStatus().getStatusCode())
shows INTERNAL_ERROR
. The docs here say "retrying should solve the problem", but it doesn't.
这有什么不对任何想法?
Any ideas on what's wrong?
类似的问题<一href=\"http://stackoverflow.com/questions/34117263/android-google-signin-not-working-in-debug-mode-googlesigninresult-is-false\">here,但我已经添加了 JSON
文件。
Similar question here, but I have added the json
file.
推荐答案
的问题是,我是从Android Studio中运行的应用程序(不设置 signingConfig
),所以应用程序是不符合我的证书,谷歌登录中需要签署的。
The problem was that I was running the app from Android Studio (without setting up signingConfig
), so the app wasn't signed with my certificate, which Google Sign-in requires.
这篇关于Android的 - GoogleSignInResult总是失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!