アンドロイドアプリでGoogleMapを使おうとすると地図が表示されず、アプリの出力にいかのエラーが表示されている。
E / Google Maps Android API : Authorization failure . Please see https : //developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.
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 : zzzzzzzzzzzzzzzzzzz
Android Application ( < cert_fingerprint > ; < package_name > ) : xx : xx : . . . ; com . example . test
GCPのCredentials で自分のAPIキーとフィンガープリントが上記のエラー出力と一致しているかを確認する。
フィンガープリントはどこ
Windowsの場合はC:\Users\\.android\debug.keystore に保存されているようだ。これを見るには、keytool を使う。パスワードは何も設定されていないようだ。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
c : \ ( PathToAndroidStudio ) \ AndroidStudio \ jre \ bin \ keytool . exe - v - list - keystore c : \ Users \ ( UserName ) \ . android \ debug . keystore
Keystore type : JKS
Keystore provider : SUN
Your keystore contains 1 entry
Alias name : androiddebugkey
Creation date : Jul 4 , 2020
Entry type : PrivateKeyEntry
Certificate chain length : 1
Certificate [ 1 ] :
Owner : C = US , O = Android , CN = Android Debug
Issuer : C = US , O = Android , CN = Android Debug
Serial number : 1
Valid from : Sat Jul 04 00 : 12 : 18 JST 2020 until : Mon Jun 27 00 : 12 : 18 JST 2050
Certificate fingerprints :
SHA1 : xx : xx : . . . .
SHA256 : xx : xx : . . . .
Signature algorithm name : SHA1withRSA ( weak )
Subject Public Key Algorithm : 2048 - bit RSA key
Version : 1