简体   繁体   English

Android Google+登录问题

[英]Android Google+ sign-in issue

I have a android application that with Google+ sign-in function. 我有一个具有Google+登录功能的android应用程序。 I have enabled Google+ API and create oauth 2.0 user client id for my application. 我已启用Google+ API并为我的应用创建了oauth 2.0用户客户端ID。 Also, I download the JSON file from https://developers.google.com/mobile/add? 另外,我从https://developers.google.com/mobile/add?下载JSON文件https://developers.google.com/mobile/add? platform=android. platform = android。 I generate the signed apk(release) and the google+ sign-in function works. 我生成签名的apk(发行版),并且google +登录功能有效。 My problem is that if I upload the signed apk to google play as a beta version. 我的问题是,如果我将签名的APK作为Beta版本上传到Google Play。 The Google+ sign-in function will be failed!!! Google+登录功能将失败!!!! The error sign-in result: Status 错误登录结果:状态

{statusCode=DEVELOPER_ERROR, resolution=null}. {statusCode = DEVELOPER_ERROR,分辨率=空}。

I have no idea about this condition, please have advised to me. 我不知道这种情况,请给我建议。 Many thanks. 非常感谢。

Generate and add your SHA1 key to the Google Project Console. 生成SHA1密钥并将其添加到Google Project控制台。 This will solve your issue. 这样可以解决您的问题。

keytool -list -v -keystore KEYSTORE_PATH -alias ALIAS_NAME keytool -list -v -keystore KEYSTORE_PATH -alias ALIAS_NAME

Use your Release keystore. 使用您的发布密钥库。

You have to enter SHA 1 certificate fingerprints from Google Play Console to your Google Project Console. 您必须从Google Play控制台向您的Google Project控制台输入SHA 1证书指纹。 Generated release SHA1 fingerprints works for signed apk but doesn't work for live apps anymore. 生成的发行版SHA1指纹适用于已签名的apk,但现在不再适用于实时应用。

You need to add your SHA1 key to firebase console configuration. 您需要将SHA1密钥添加到Firebase控制台配置中。 You can do it in this way: 您可以通过以下方式进行操作:

Firebase console ( https://console.firebase.google.com ) -> your project -> configuration -> scroll to Firebase控制台( https://console.firebase.google.com )->您的项目->配置->滚动到

在此处输入图片说明

You can find your SHA1 key running "Signin report" from Android Studio: 您可以从Android Studio中找到运行“登录报告”的SHA1密钥:

在此处输入图片说明

Then, look the "run tab" and click the button: 然后,查看“运行选项卡”并单击按钮:

在此处输入图片说明

I think it's the easier way. 我认为这是更简单的方法。 Hope this help. 希望对您有所帮助。

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

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