"Google Play服务正在更新";在Google Maps API中 [英] "Google Play services are updating" in Google Maps API

查看:1698
本文介绍了"Google Play服务正在更新";在Google Maps API中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Google Maps的Android应用.突然,它停止了在发布模式下的工作.地图视图告诉 Google Play服务正在更新在模拟器和真实设备上.在网上搜索的每个人都在谈论API密钥文件,但这不是我的问题!

I have an Android app which makes use of Google Maps. All of a sudden, it stopped working in release mode. The Map view tells Google Play services are updating on the emulator and on real devices. Searching on the net everyone talks about the API key file, but this is not my problem!

我尝试了发行设置的每种可能的不同组合,并且我发现,当我在构建配置中设置debuggable = false时出现了问题(使用debuggable = true可以正常工作).我不明白为什么Google Maps不能正常运行,因为APK不可调试.我还尝试了多个版本的Google Play服务,甚至是最新版本(10.2.0).没什么.

I have tried every possible different combination of release settings, and I have found out that the problem occurs when I set debuggable = false in the build configuration (with debuggable = true it works). I can't understand why Maps aren't working because, of course, the APK is not debuggable. I have also tried multiple versions of Google Play services, even the latest (10.2.0). No difference.

我该怎么办?请帮忙,因为在修复此错误之前,我无法在Play商店上发布任何新版本.

What can I do? Please help as I can't release any new release on Play Store until I fix this bug.

推荐答案

如果将debugbable设置为false,它将停止工作"

"If I set debuggable to false it stops working"

这表明您的API访问仅限于调试模式.考虑到没有用于调试和发布的单独的API密钥,这似乎表明您的密钥已与调试证书绑定在一起.

This suggests your API access is restricted to debug mode. Considering there are not separate API keys for debug and release it would appear your key has been tied to your debug certificate.

文档:

您可以选择添加限制.对于Android应用,您将密钥限制为应用的SHA-1指纹

You can optionally add a restriction. For Android apps, you restrict the key to your app's SHA-1 fingerprint

如果您有这样的限制,则发行证书的不同指纹将破坏您的API访问权限.

If you have such a restriction in place, the differing fingerprint of the release certificate will break your API access.

看看上面链接的文档的自行获取证书信息"部分,以获取正确的(发布)证书指纹

Take a look at the "Getting the certificate information yourself" section of the documentation linked above to get the correct (release) certificate fingerprint

这篇关于"Google Play服务正在更新";在Google Maps API中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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