Android:Google Map v2 未显示发布 apk 的地图

编程入门 行业动态 更新时间:2024-10-22 21:29:10
本文介绍了Android:Google Map v2 未显示发布 apk 的地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我的谷歌地图应用程序在带有调试谷歌地图 API KEY 的设备上运行良好,但是当我使用发布谷歌地图 API KEY 为我的应用程序创建签名的 apk 时,它不显示地图.为了生成发布模式 google API KEY ,我在我的密钥库中使用 SHA1 指纹.而且我还在我的项目设置中定义了签名和构建类型",正如 developer.android(http://developer.android/tools/publishing/app-signing.html).

My google map app works fine on device with debug google map API KEY but when I create signed apk for my app with release google map API KEY, it does not display map. To generate release mode google API KEY , i am using SHA1 fingerprint with my keystore. And i am also defining "signing and build types" in my project Settings as explained by developer.android(http://developer.android/tools/publishing/app-signing.html).

尝试了所有可能的解决方案(删除apk然后重新安装,重新启动设备,清理项目).没有任何效果.任何人对我的问题有很好的解决方案,请帮助.仅供参考,使用 android studios 平台.

Tried every possible solution(removing apk and than reinstalling it again, restarting the device, cleaning the project ). nothing worked. Anybody have a good solution to my problem please help. FYI Using android studios platform.

推荐答案

也许你有两个 google_maps_api.xml 文件,一个在 app/src/debug/res/values 文件夹中,另一个在 app/src/release/res/values 文件夹,但只有调试文件夹包含您的 API 密钥.

Maybe you have two google_maps_api.xml files, one in the app/src/debug/res/values folder and the other in the app/src/release/res/values folder, but only the debug one contains your API key.

这篇关于Android:Google Map v2 未显示发布 apk 的地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-18 16:15:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/942670.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:地图   Google   Android   Map   apk

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!