私はAndroid開発を初めて利用しています。私はAndroid Maps APIを使用するアプリケーションを作成しています。ビルドツールとAndroid Studioをアップデートするまで、うまくいきました。今、毎回私はそれを実行し、私のマップが示されており、私は次のエラーを取得されていません。サーバーで認証が行われます。 Android Maps APIが動作しない
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>
そして、 HERESに私の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>
私はこの問題を解決するための多数の方法を試してみましたが、何も作業していません。どんな助けも素晴らしいだろう。ありがとう!
ああはい。マップAPIを有効にして、デベロッパーコンソールを使用して有効なキーを作成しました。これまでは以前から仕事をしていましたが、ビルドツールやAndroidスタジオを更新した後は停止しました。私も複数のキーを試しましたが、改善はありません。許可とusses許可 を追加 – Pruthvi
てみ <許可 アンドロイド< - - Googleマップを受信するためのパーミッションを作成!>:名= "com.arshad.map.permission.MAPS_RECEIVE" アンドロイド:のProtectionLevelは= "署名" /> <! - Googleマップを受け取る許可 - > –
でも動作しません。それは私のビルドファイルと関係がありますか? – Pruthvi