使用两个sha1键在Play商店中发布后,Google登录无法正常工作 [英] Google sign in not working after publishing in play store with having two sha1 keys

查看:165
本文介绍了使用两个sha1键在Play商店中发布后,Google登录无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两种风味. 每个都有调试和发布构建类型.

我有两个googleservice.json用于两种构建风格. 除gmail登录外,其他一切正常.

在本地gmail中登录可以正常工作. 但是,将应用程序上载到Playstore后,Gmail登录不起作用. 我更新了两个sha1密钥以进行调试,然后在firebase控制台中发布.并获取了最新的googleservice.json文件.

但是在Play商店上仍然面临着问题.

我在我的护卫者中拥有这个

-保留类com.google.android.gms.** {*; }

-dontwarn com.google.android.gms.**

我正在引用您所有的stackoverflow问题,但仍然没有得到答案.

谢谢, 阿伦拉吉(Arunraj M)

解决方案

在已注册项目下的Google Developers Console中添加我的发布密钥(.jks文件)的SHA1密钥.

Android Studio的左侧,在项目视图下有一个用于构建变体的选项.在那里,我将每个模块更改为发布模式(默认情况下处于调试模式).然后通过常规方法创建Signed APK,然后运行该应用程序.

Google登录完美运行.

关注此链接 Google登录已签名的APK不能正常工作

,在添加SHA-1 Google Developers Console后,将其替换为google-services.json

注意:Google的JSON文件在项目中应该只有一个

i have two build flavours. Each have debug and release build types.

i having two googleservice.json for two build flavours. All are working fine except gmail login.

In local gmail login works fine. But after uploading app to playstore, gmail login not works. i update two sha1 key for debug and release in firebase console.and get the latest googleservice.json file.

But still facing issue on play store.

And i am having this in my proguard

-keep class com.google.android.gms.** { *; }

-dontwarn com.google.android.gms.**

And i m refering all your stackoverflow question but still not get a answer.

Thanks, Arunraj M

解决方案

Add the SHA1 key of my release key (the .jks file) in the Google Developers Console under the project registered.

In Android Studio, at the left side, there is an option for Build variants under the project view. There, I changed each module to release mode (it is in debug mode by default). Then created the Signed APK by usual method, and run the app.

The Google Signin worked perfectly.

follow this link Google sign in signed apk not working

and after adding SHA-1 Google Developers Console replace with google-services.json

NOTE: JSON file of google should only one in project

这篇关于使用两个sha1键在Play商店中发布后,Google登录无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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