Android:Google Map v2 未显示发布 apk 的地图 [英] Android: Google Map v2 not showing map for release apk

查看:31
本文介绍了Android:Google Map v2 未显示发布 apk 的地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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