本文介绍了发布应用后,Google Drive Api停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用了谷歌驱动器api,当我使用.apk文件安装它时,它在调试和发布版本中均能正常工作.

I'm using google drive api in my app which works fine on both debug and release builds when I install it using .apk file.

但是,如果我在Playstore上发布相同版本的.apk,然后从那里下载,我将无法登录Google.

But if I publish the same release .apk on playstore and then download it from there I can't sign in to Google.

关于该问题,我能找到的是人们没有在Google开发人员控制台上使用发布密钥库来生成凭据,

All I can find regarding the issue is that people aren't using release keystore to generate credentials on Google's developer console, which is not the case for me.

推荐答案

我发现了一个问题:

检查您是否已注册发布管理"下的应用签名"程序.如果是,则必须有两个证书-上传证书和应用签名.

Check if you have been enrolled in App Signing program under Release Management. If yes, there must be two certificates - upload and App signing.

复制App Signing证书的Sha1并在开发人员控制台中创建新的OAuth客户端ID.

Copy Sha1 of App Signing certificate and create new OAuth client ID in developer console.

然后转到Firebase Project设置,将复制的指纹添加到您的应用中,然后下载google-services.json.

Then go to Firebase Project settings, add copied fingerprint to your app and download google-services.json.

在Android Studio中将已下载的代码替换为现有的 google-services.json ,这样您就可以开始使用了.

Replace your existing google-services.json in android studio with downloaded one and you are good to go.

我不知道何时或为何启用此功能.它将用新的证书替换您上载的应用程序的签名证书.

I have no idea when or why I enabled this thing. It replaces signing certificate of your uploaded application with the new one.

这篇关于发布应用后,Google Drive Api停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-17 09:42
查看更多