前提・実現したいこと
android アプリでgooglemap を表示したい
発生している問題・エラーメッセージ
Ensure that the "Google Maps Android API v2" is enabled. Ensure that the following Android Key exists: API Key: {{僕のAPIキー}} Android Application (<cert_fingerprint>;<package_name>): {{フィンガープリント}};{{パッケージ名}}
xml
1<?xml version="1.0" encoding="utf-8"?> 2<manifest xmlns:android="http://schemas.android.com/apk/res/android" 3 xmlns:tools="http://schemas.android.com/tools" 4 package="com.websarva.wings.android.app"> 5 6 <!-- To auto-complete the email text field in the login form with the user's emails --> 7 <uses-permission android:name="android.permission.GET_ACCOUNTS" /> 8 <uses-permission android:name="android.permission.READ_PROFILE" /> 9 <uses-permission android:name="android.permission.READ_CONTACTS" /> 10 <!-- 11 The ACCESS_COARSE/FINE_LOCATION permissions are not required to use 12 Google Maps Android API v2, but you must specify either coarse or fine 13 location permissions for the 'MyLocation' functionality. 14 --> 15 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 16 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 17 <uses-permission android:name="android.permission.INTERNET" /> 18 <application 19 android:allowBackup="true" 20 android:icon="@mipmap/ic_launcher" 21 android:label="@string/app_name" 22 android:roundIcon="@mipmap/ic_launcher_round" 23 android:supportsRtl="true" 24 android:theme="@style/AppTheme" 25 android:networkSecurityConfig="@xml/network_security_config" 26 tools:ignore="ExtraText,GoogleAppIndexingWarning" 27 tools:targetApi="n"> 28 29 <activity 30 android:name=".LoginActivity"> 31 <intent-filter> 32 <action android:name="android.intent.action.MAIN" /> 33 34 <category android:name="android.intent.category.LAUNCHER" /> 35 </intent-filter> 36 </activity> 37 <!-- 38 The API key for Google Maps-based APIs is defined as a string resource. 39 (See the file "res/values/google_maps_api.xml"). 40 Note that the API key is linked to the encryption key used to sign the APK. 41 You need a different API key for each encryption key, including the release key that is used to 42 sign the APK for publishing. 43 You can define the keys for the debug and release targets in src/debug/ and src/release/. 44 --> 45 <meta-data 46 android:name="com.google.android.geo.API_KEY" 47 android:value="@string/google_maps_key" /> 48 49 <activity 50 android:name=".MainActivity" 51 android:label="@string/title_activity_maps" 52 tools:ignore="DuplicateActivity"> 53 54 </activity> 55 </application> 56 57</manifest>
試したこと
google console で色々操作してみましたが自分がなにをやっているかがわかりません
AndroidManifest.xml,google_maps_api.xmlにはAPIキーを書きました。
https://developers.google.com/drive/android/auth
のサイトに書いてあるSHA1 fingerprint とはmanifestに最初からコメントアウトされた文に書いてあるものでしょうか?
それともエラー文にかかれているものでしょうか?(書いてあるコマンドを打っても使えませんでした。ubuntuを使っています。)
このサイトのとおりに勧めていってもうまく行きませんでした。
Ensure that the "Google Maps Android API v2" is enabled.と書いてありますが、
API ライブラリのページの
Maps SDK for android に
APIが有効ですと書いてあれば"Google Maps Android API v2"は有効なのでしょうか?
SDK manager の SDK Tools の google play service は有効にしました
補足情報(FW/ツールのバージョンなど)
以前動いていましたが、パソコンを変えたら表示されなくなりました。
すでに上に書いてあることでも有効そうな手段があれば教えてくださるとありがたいです
自分は
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/05/19 13:11