Ich bin neu in der Android-Entwicklung. Ich habe eine App erstellt, die das Android Maps API verwendet. Es hat gut funktioniert, bis ich meine Build-Tools und Android Studio aktualisiert habe. Jetzt jedes Mal wenn ich laufen, meine Karte nicht gezeigt, und ich erhalte den folgenden Fehler:Authentifizierung wurde auf dem Server abgelegt. Android Maps API funktioniert nicht
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
Hier ist ein Beispiel meines Android Manifest:
<?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>
Und her meine Android Maps API-Datei:
<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>
Ich habe zahlreiche Methoden versucht, das Problem zu lösen, aber nichts funktioniert. Jede Hilfe wäre großartig. Vielen Dank!
Oh ja. Ich habe die Karten-API aktiviert und über die Entwicklerkonsole einen gültigen Schlüssel erstellt. Früher hat es funktioniert, aber nach dem Update der Build-Tools und Android Studio wurde es gestoppt. Ich habe auch mehrere Tasten ausprobiert, aber keine Verbesserung. – Pruthvi
Versuchen Zugabe Erlaubnis und Usses-Erlaubnis: Name = "com.arshad.map.permission.MAPS_RECEIVE" android: Protection = "Signatur" /> –
Selbst das funktioniert nicht. Hat es etwas mit meinen Build-Dateien zu tun? – Pruthvi