从Play商店访问应用程序时,无法在真实设备上使用Google进行身份验证 [英] Cannot authenticate with google on a real device when accesing the app from play store
问题描述
当我在不同的模拟器上测试我的应用程序时效果很好。当我将一个真实设备与Android Studio连接起来,但是当我从 Google Play Store
安装该应用程序时,它还可以正常工作。
Apy键在我的 AndroidManifest.xml
文件中也是一样的,同样在我的 google-services.json $ c $并且我的
Android开发者控制台中的
Android键(由Google服务自动创建)
部分也是相同的 > account。
在登录方法部分中,我的
Firebase
帐户我也启用了 Google
和电子邮件/密码
身份验证。
有谁知道为什么会发生这种情况,我该如何解决这个身份验证问题?
在此先感谢!
使用
Firebase
, Google API控制台$ c $ 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进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!