上传到Play商店后,地图活动空白 [英] Maps Activity Blank after uploaded to Play Store

查看:105
本文介绍了上传到Play商店后,地图活动空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题中提到的,在我上传应用程序后,地图活动显示空白(底部带有Google徽标)。我知道这个问题已被多次询问,但没有一个解决方案能够解决我的问题。



这是我迄今为止所做的:按照官方指南


  • 点击TODO的基于范围的选项卡。

    这也发生在我身上。


  • As mentioned in the title, the Maps Activity shows blank (with Google logo underneath) after I've uploaded the application. I am aware this question has been asked many times but none of the solution is able to resolve my issue.

    This is what I've done so far:

    • Generated Google Maps Release API Key (with SHA-1 signature) following the official guide here and placed it under the release/res/values/google_maps_api.xml
    • Place the Release API Key hardcoded into the AndroidManifest.xml
    • Clean and rebuild the project

    This is the result:

    • The Maps Activity just worked perfectly fine if the app-release.apk is installed manually to the device before upload to the Play Store.
    • The Maps Activity shows blank if the app-release.apk after the app-release.apk is uploaded to the Play Store.

    Solution:

    This

    Probably you've entered the key in Debug only as when we add Gmap activity, only google_maps_api.xml opens. So put your key in Release also. How?...see.

    1. Click on TODO on the Bottom bar of Android Studio.
    2. Click on scope Based tab of TODO.
    3. Now there are two google_maps_api.XML, open each and copy your key to XML with no key (YOUR_KEY_HERE). This also happened with me.

    这篇关于上传到Play商店后,地图活动空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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