简体   繁体   English

如果通过 Google Play 安装 APK,则 Google 地图将无法使用

[英]Google maps don't work if APK is installed via Google Play

I have Android app with Google maps.我有带谷歌地图的 Android 应用程序。

Debug and Release versions of APK works fine if I build and install it directly to phone.如果我将 APK 的调试和发布版本直接构建并安装到手机,则它可以正常工作。

But when I install the APK from Google Play (Alpha or Beta testing), maps are not shown (blank screen).但是当我从 Google Play 安装 APK(Alpha 或 Beta 测试)时,地图不显示(空白屏幕)。

I have of course API key in release XML file and so on...I cannot understand, why same APK is okay, if I install it directly to phone and maps is not shown if this APK is installed via Google Play.我当然在发布 XML 文件中有 API 密钥等等......我无法理解,为什么相同的 APK 可以,如果我直接将它安装到手机上,如果通过 Google Play 安装此 APK,则不会显示地图。

Any advise?有什么建议吗?

I found a problem.我发现了一个问题。 Somebody from our team enabled (accepted) "Google Play App Signing" for this app (see more here) .我们团队的某个人为此应用启用(接受)“Google Play 应用签名” (在此处查看更多信息) So adding SHA from Google Play Console to Google Console (API key) solved this problem.因此,将 SHA 从 Google Play Console 添加到 Google Console(API 密钥)解决了这个问题。

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

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