gpt4 book ai didi

android - Google Maps 开发和发布之间的关键

转载 作者:行者123 更新时间:2023-11-30 02:10:41 26 4
gpt4 key购买 nike

我的应用程序中有谷歌地图 key ,它工作正常没问题

问题是当我在 google play 上发布我的应用程序时,我看不到 google map !

我在一些帖子中读到我不必更改 key ,因为我可以在发布和开发中使用相同的 key Google Maps Android V2 debug and release keySwitching between Google Maps Android API v2 DEBUG and RELEASE API Key

还有一些其他帖子说我必须获得另一个 key 才能发布 Generating Google map Release API Key

现在在我的情况下,相同的 key 不起作用。

我使用 google_maps_api.xml 中的链接生成 key (应用程序 ID 在发布以及开发和发布中相同)

https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=A9:DC:??:??:??:??:??:??:??:??:??:??:??:??:??:??%3Bcom .??????.????????.????

A9:DC:??:??:??:??:??:??:??:??:??:??:??:??:??:? ?开发和发布有什么区别?

我必须做什么。

谢谢

最佳答案

您必须创建两个 key 。一种用于开发,一种用于生产。

What is the difference between development and production key?

当您编译用于开发的应用程序时,它会使用开发 key 进行签名,而当您准备用于生产的应用程序时,您会使用生产 key 对其进行签名。

Google map API key 基于此 key 。因此,您必须创建两个 key ,一个在编译开发应用程序时使用,一个用于生产。

Can I have the same Google Maps API Key for Development and Production?

Google Maps API 要求您提供 SHA1 和包名称。包名称在开发和生产中保持不变。您从 key 创建 SHA1。此 key 对于开发和生产是不同的。因此,您必须创建两个不同的 SHA1 并使用它们在 Google API 控制台中创建 key 。

您可以在 Android 官方页面上阅读更多有关如何创建开发和发布 SHA1 以创建 API KEY 的信息 https://developers.google.com/maps/documentation/android/start#display_your_apps_certificate_information

关于android - Google Maps 开发和发布之间的关键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30147376/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com