无法在真实设备上使用Google进行身份验证

无法在真实设备上使用Google进行身份验证

本文介绍了从Play商店访问应用程序时,无法在真实设备上使用Google进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在不同的模拟器上测试我的应用程序时效果很好。当我将一个真实设备与Android Studio连接起来,但是当我从 $ c>和 google-services.json 文件。



您将会知道该版本A PK和调试APK具有不同的SHA1和用于Google服务的不同API密钥。因此,您需要在Project Setting中的 Firebase 中添加它们。完成此操作后,您需要下载 google-services.json 文件并将其放入您的项目中。使用您的密钥库创建新版本,并在Google Play商店上发布您的应用。


When i test my app on different emulators works fine. It works also fine when i link a real device with Android Studio but when i install the app from Google Play Store i cannot authenticate.

The Apy key is the same in my AndroidManifest.xml file, also in my google-services.json file and is also the same in my Android key (auto created by Google Service) section from my Google Developer Console account.

In SIGN-IN METHOD section from my Firebase account i have also enabled Google and Email/Password authentication.

Does anyone know why is this is happening and how can i fix this authenticate issue?

Thanks in advance!

解决方案

Seems like configuration issue with Firebase, Google API console and google-services.json file.

You would be aware of that release APK and debug APK has different SHA1 and different API keys for google services. So you need to add both of them on Firebase inside Project Setting. After doing this you need to download google-services.json file and put it in your project. Create a fresh release build with your keystore and publish you app on Google Play store.

这篇关于从Play商店访问应用程序时,无法在真实设备上使用Google进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 12:24