Android Google登录无法在调试模式下运行:GoogleSignInResult为false [英] Android Google SignIn not working in debug mode: GoogleSignInResult is false
问题描述
我一直在按照本教程进行操作,以使Google SignOn正常运行: https://developers.google.com/identity/sign-in/android/start-integrating
I have been following this tutorial to get Google SignOn going: https://developers.google.com/identity/sign-in/android/start-integrating
当我使用虚拟设备在本地运行我的应用程序时,它运行良好,但是当我通过调试将其部署到我的设备上时,或者生成签名的jar文件并将其手动复制时,GoogleSignInResult
始终返回带有
When I run my application locally with a virtual device it works fine but when I deploy it to my device via debugging or if I generate a signed jar file and copy it manual GoogleSignInResult
always returns false
with an INTERNAL ERROR
message.
我一直在努力,以便在通过调试将应用程序部署到我的设备时能够使用google登录.非常感谢您的帮助!
I'm struggling since quite a while to be able to use google login when deploying the application via debug to my device. Any help is highly appreciated!
我的问题的解决方案:
在下载json文件的地方,您必须复制过去可以使用Java密钥工具生成的代码.我已经连续好几次错过了.
Where you download the json file you have to copy past the code that you can generate with the java key tool. I totally missed that a few times in a row.
推荐答案
您可能缺少开发者控制台注册.通常,开发人员将具有多个签名证书配置:调试密钥库,测试环境签名证书,生产签名证书.签名证书SHA1 +软件包名称唯一地标识了一个Android客户端,并且需要在开发控制台中单独注册.
You are probably missing dev console registration. It's very common developers will have multiple signing cert configuration: debug key store, test environment signing cert, production signing cert. signing cert SHA1 + package name uniquely identifies an Android client and needs to be registered individually in dev console.
请参阅以下博客文章,以了解有关OAuth客户端注册的更多信息:
See below blogpost to understand more about OAuth clients registration:
http://android-developers. blogspot.com/2016/03/registering-oauth-clients-for-google.html
或查看此帖子: 在开发阶段在Android上测试Google登录
这篇关于Android Google登录无法在调试模式下运行:GoogleSignInResult为false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!