为什么Google Map不会在发布密钥上显示? [英] Why doesn't Google Map show on release key?

查看:106
本文介绍了为什么Google Map不会在发布密钥上显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么Google Map不显示在发布身份验证密钥上?

Why doesn't Google Map show on release authentication key?

在我使用释放键之前,它可以正常运行.

Before I use release key, it ran normally.

这是我的日志:

09-10 11:01:25.361: E/b(21729): Authentication failed on the server.
09-10 11:01:25.361: E/Google Maps Android API(21729): Authorization failure.  Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
09-10 11:01:25.391: E/Google Maps Android API(21729): In the Google Developer Console (https://console.developers.google.com)
09-10 11:01:25.391: E/Google Maps Android API(21729): Ensure that the "Google Maps Android API v2" is enabled.
09-10 11:01:25.391: E/Google Maps Android API(21729): Ensure that the following Android Key exists:
09-10 11:01:25.391: E/Google Maps Android API(21729):   API Key: AIzaSyBiDi1b8SwwYsr08rbRtI6UJt71kwbZrNE
09-10 11:01:25.391: E/Google Maps Android API(21729):   Android Application (<cert_fingerprint>;<package_name>): 4F:B8:B5:15:F1:FB:2F:6D:27:00:2E:C4:91:B8:FE:E1:18:7D:46:80;bamb.nitaf.wedding

推荐答案

请确保有关Google Map V2的以下内容:

Please make sure about the following things about Google Map V2:

1.为发布密钥生成正确的SHA-1.

1.Generating correct SHA-1 for your release key.

2.使用正确的程序包名称和生成的SHA-1生成API密钥

2.Generating the API key with the correct package name and the generated SHA-1

3.在manifest.xml中定义正确的权限来访问地图:

3.Defining the correct permissions in manifest.xml to access the map:

<permission
        android:name="yourpackagename.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <uses-permission android:name="yourpackagename.permission.MAPS_RECEIVE" />

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

  <!-- Required OpenGL ES 2.0. for Maps V2 -->
    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

  <!-- Goolge API Key -->
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="yourApiKey" />

4.最后在开发者控制台中启用Google API MAPV2.

4.Lastly enabling Google API MAPV2 in developer console.

在您的情况下,我怀疑您的发布模式的SHA-1错误,因此也是错误.

In your case,I suspect that the SHA-1 for your releaese mode is wrong and hence the error.

请参见以生成API密钥正确.

Please see this to generate API Key correctly.

这篇关于为什么Google Map不会在发布密钥上显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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