Olá Pessoal!
Quando clico no mapa o mesmo não aparece . Alterei o código de acordo com os tópicos relacionados, já gerei diversas chaves no google, procurei na net, porém não consegui corrigir o erro.
Agradeço muito se alguém puder me ajudar!
Segue o erro:
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.
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: AIzaSyDrvbtq4EuPhrK2NFaRJ-8iKO_aj4wUBu0
Android Application (<cert_fingerprint>;<package_name>): 18:0B:E7:FB:72:5C:A8:EF:60:57:1C:13:88:03:FB:7D:20:58:48:88;br.com.alura.agenda
Segue os arquivos relacionados:
app:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation 'com.android.support:design:28.0.0-alpha3'
implementation 'com.android.support:support-v4:28.0.0-alpha3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:cardview-v7:28.0.0-alpha3'
implementation 'com.google.android.gms:play-services:12.0.1'
}
google_mapa_api.xml
<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=FF:A5:99:5B:16:B9:BF:21:F1:7B:2D:4A:79:F4:1C:D9:62:A8:8E:84%3Bbr.com.alura.agenda
You can also add your credentials to an existing key, using these values:
Package name:
FF:A5:99:5B:16:B9:BF:21:F1:7B:2D:4A:79:F4:1C:D9:62:A8:8E:84
SHA-1 certificate fingerprint:
FF:A5:99:5B:16:B9:BF:21:F1:7B:2D:4A:79:F4:1C:D9:62:A8:8E:84
Alternatively, follow the directions here:
https://developers.google.com/maps/documentation/android/start#get-key
Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">AIzaSyDrvbtq4EuPhrK2NFaRJ-8iKO_aj4wUBu0</string>
</resources>
AndroidManifest.xml
<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=FF:A5:99:5B:16:B9:BF:21:F1:7B:2D:4A:79:F4:1C:D9:62:A8:8E:84%3Bbr.com.alura.agenda
You can also add your credentials to an existing key, using these values:
Package name:
FF:A5:99:5B:16:B9:BF:21:F1:7B:2D:4A:79:F4:1C:D9:62:A8:8E:84
SHA-1 certificate fingerprint:
FF:A5:99:5B:16:B9:BF:21:F1:7B:2D:4A:79:F4:1C:D9:62:A8:8E:84
Alternatively, follow the directions here:
https://developers.google.com/maps/documentation/android/start#get-key
Once you have your key (it starts with "AIza"), replace the "google_maps_key"
string in this file.
-->
<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">AIzaSyDrvbtq4EuPhrK2NFaRJ-8iKO_aj4wUBu0</string>
</resources>