简体   繁体   English

谷歌登录无法在发布apk android

[英]google signIn not working in release apk android

In release apk, google sign is not working but in debug apk it is working. 在版本apk中,google sign不起作用,但在调试apk中起作用。 I have updated sha1 also. 我也更新了sha1。 In release sha1, debug sha1 both are same. 在发行版sha1中,调试sha1都相同。 i checked in gradle console. 我检查了gradle控制台。 I referred more tutorials, stack overflow solutions. 我提到了更多的教程,堆栈溢出解决方案。 i can't find the solution. 我找不到解决方案。 is there any better solution? 有没有更好的解决方案?

You need to add your release sha1 key into the google console To get release sha1 key you can try For Windows 您需要将发布sha1键添加到Google控制台中。要获取发布sha1键,您可以尝试使用Windows

keytool -list -v -keystore {path to keystore(jks file)} -alias {alias_name}

For Linux/Max 对于Linux / Max

keytool -exportcert -list -v  -keystore ~/path_to_your_keystore

add that sha1 key to google console 将sha1键添加到Google控制台

How to find release sha1 : 如何找到发布sha1:

Type below command in your cmd or terminal: 在您的cmd或终端中输入以下命令:

keytool -list -v -keystore D:\\filepath\\YourAPP.jks -alias XYZ

and debug sha1 : 并调试sha1:

![移到最左边[![] [1] [1]

Please refer to the following images and get the SHA-1 key 请参考以下图片并获取SHA-1密钥 刷新

在控制台面板底部查看

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM