K
K
kirawa2014-12-05 08:32:26
Android
kirawa, 2014-12-05 08:32:26

How to work with GoogleMap?

Created a google maps template in android studio. There is a google_maps_api.xml(debug) file in value.

<resources>
    <string name="google_maps_key_instructions" templateMergeStrategy="replace"><!--
 
    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:
 
[url]https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=F0:B2:F3:N5:41:D3:D1:38:89:5D:C4:F1:E1:24:A2:60:D7:F1:D4:E5%3Broot.googlemap[/url]
 
    You can also add your credentials to an existing key, using this line:
    F0:B2:F3:N5:41:D3:D1:38:89:5D:C4:F1:E1:24:A2:60:D7:F1:D4:E5;mypackge.googlemap
 
    Once you have your key (it starts with "AIza"), replace the "google_maps_key"
    string in this file.
    --></string>
 
    <string name="google_maps_key" templateMergeStrategy="preserve">AIzaSyCkGpkNVdernKBsuajZ62zKf1BSMhYFQgs</string>
</resources>

I follow the link, create a new project in the console and it gives me a code like AIza .. I insert it into google_maps_key and run the project.
12-12 08:56:16.096 30610-30628/root.googlemap E/Google Maps Android API﹕ Authorization failure. Please see https://developers.google.com/maps/d.../android/start for how to correctly set up the map.
12-12 08:56:16.126 30610-30628/root.googlemap 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: AIzaS***********************
Android Application (;): C8:C9:09:31:BF :1C:AD:6E:6D:2E:3D:F6:E5:9F:A5:28:35:46:37:93;root.googlemap
Google Maps Android API v2 = enabled
I visited jdk to prescribe keytool -list -v -keystore mystore.keystore
here and the SHA1 certificate was the same as generated by android studio ... Please help me figure it out

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2014-12-05
@gadfi

the debug key is issued for a year, delete the old storage, create an empty project in Eclipse - it will create the debug key itself, Ideac used to have problems with this, as I don’t know now ─ I myself somehow lost two days with cards with the same problem)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question