服务器上归档的身份验证。 Android 地图 API 不工作

Authentication Filed on Server. Android Maps API not working

我是 Android 开发的新手。我一直在创建一个使用 Android 地图 API 的应用程序。它运行良好,直到我更新了我的构建工具和 Android Studio。现在每次我 运行 它,我的地图都没有显示,我得到以下错误:

05-11 11:51:54.716 1535-1589/com.pruthvi.lanes I/OpenGLRenderer﹕ Initialized EGL, version 1.4 05-11 11:52:17.658 1535-1590/com.pruthvi.lanes E/b﹕ Authentication failed on the server. 05-11 11:52:17.658 1535-1590/com.pruthvi.lanes E/Google Maps Android API﹕ Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map. 05-11 11:52:17.668 1535-1590/com.pruthvi.lanes E/Google Maps Android API﹕ In the Google Developer Console (https://console.developers.google.com) Ensure that the "Google Maps Android API v2" is enabled. Ensure that the following Android Key exists: API Key: AIzaSyA0QeeMrXpO06bvguCeF8iHFHWz3gwHrZw Android Application (;): CC:8B:FA:E7:38:1F:A3:B6:93:A9:D7:EB:1E:2F:56:B9:F1:04:A0:FE;com.pruthvi.lanes

这是我的 Android 清单的示例:

<?xml version="1.0" encoding="utf-8"?>

    <!--
 The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
         Google Maps Android API v2, but are recommended.
    -->

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxwHrZw" />

    <activity
        android:name=".MapsActivity"
        android:configChanges="orientation|screenSize"
        android:label="@string/title_activity_maps" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".LeftActivity"
        android:label="Contacts" >
    </activity>
    <activity
        android:name=".RightActivity"
        android:label="Contacts" >
    </activity>
    <activity
        android:name=".TopActivity"
        android:label="Profile"
        android:theme="@style/Theme.Transparent">
    </activity>

<activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
    </activity>

这是我的 Android 地图 API 文件:

<resources>
<!--
TODO: Before you run your application, you need a Google Maps API key.

To get one, follow this link, follow the directions and press "Create" at the end:

https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=38:E4:08:5A:74:76:1E:21:32:DB:B2:EF:E9:3E:AD:C0:CF:15:64:73%3Bcom.pruthvi.lanes

You can also add your credentials to an existing key, using this line:
38:E4:08:5A:74:76:1E:21:32:DB:B2:EF:E9:3E:AD:C0:CF:15:64:73;com.pruthvi.lanes

Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
<string name="google_maps_key" translatable="false" templateMergeStrategy="preserve">
    AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxwHrZw
</string>

我尝试了很多方法来解决这个问题,但没有任何效果。任何帮助都会很棒。谢谢!

您是否启用了 Google 地图 Android API(检查此 link) and check if your key is valid (this link

很好!解决了!我的指纹在控制台和 logcat 中都不同。使用 logcat 中的那个并创建了一个密钥,现在它可以正常工作了。感谢达科的帮助。非常感谢。