为什么会出现此错误"com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException" [英] why this error is coming "com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException"

查看:150
本文介绍了为什么会出现此错误"com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Drive应用程序存储,并且在调试apk和发行apk中都可以正常工作,但是一旦我将该apk上传到Play商店,然后从Play商店下载,此功能就会停止工作.

I am working with google drive app storage and that is working fine in debug apk as well as release apk but once I upload that apk to play store and then if download from play store this feature stop working.

我尝试举杯敬酒,以了解为什么会出现此问题,然后我知道下面的错误即将来临

I have tried to put some toast in catch to understand why this issue is coming then I know this below error is coming

com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException

我有Google,但对我来说却无济于事.

I had google but not help in my case.

推荐答案

我遇到了同样的问题,我确实阅读了一些帖子,并能够按照以下步骤完成工作

I had same problem, i did read some posts and was able to get work done by following below steps

第1步)请转到 https://console.developers.google.com/apis /credentials ?

步骤2)点击创建凭据->选择OAuth客户端ID->选择应用程序类型为Android

Step 2) Click on create credentials ->select OAuth client ID ->select application type as Android

第3步,然后在您应该拥有密钥库及其路径之前,在命令提示符下编写以下命令,以生成签名证书指纹

Step 3) then generate Signing-certificate fingerprint by writing below command in command prompt before that you should have keystore and its path

 keytool -exportcert -keystore "D:\PlayStore_keystore\myproject.jks" -list -v

第4步),点击Enter后,系统会要求您输入

Step 4) after click on enter you will be asked for

 Enter keystore password : 
 Enter password which you have used for creating keystore 

第5步),然后将提供有关密钥存储区(如SHA1,SHA256,MD5等)的详细信息.

Step 5) then it will give details regarding keystore like SHA1,SHA256,MD5 etc.

步骤6)输入SHA1作为指纹,并提供清单文件中的软件包名称

Step 6) Enter SHA1 as fingerprint and give packagename which is in manifest file

步骤7)点击创建,您将获得新的OAuth客户端ID

step 7) Click create you will get new OAuth client ID

第8步),现在您已经拥有了客户端ID,您将需要获取google-services.json文件.

step 8) now you have got client id you will need to get google-services.json file.

第9步),请转到 https://console.firebase.google.com

第10步),如果您已经拥有该软件包名称的项目->进入概述->单击写有软件包名称的菜单图标

step 10) if you already have project with that packagename ->go to overview ->click on menu icon where packagne name is written

第11步)选择设置,转到[>标签]-> [常规]>将有一个名为添加指纹"的选项

step 11) select settings goto-> tab General-> there will be option called Add fingerprint

步骤12)在步骤5中,您已将SHA1粘贴到证书指纹中并保存

step 12) in step 5 you have got SHA1 paste that in certificate fingerprint and save it

第13步)现在下载新的google-services.json文件(因为它包含新的客户端ID,certificate_hash等)

step 13) now download new google-services.json file (as it conatins new client id ,certificate_hash etc)

第14步)将该google-services.json文件粘贴到您的android项目中的应用文件夹中.

step 14) paste that google-services.json file in app folder in your android project.

第15步)您很高兴...

step 15) You are good to go...

这篇关于为什么会出现此错误"com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAuthIOException"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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