Вопрос: Android studio шаблон GoogleMap Activity
Создал шаблон гугл карт. В value есть файл google_maps_api.xml(debug)//
XML |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| <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> |
|
Я перехожу по ссылки, создаю новый проект в консоли и мне выдает код типа AIza.. я его вставляю в google_maps_key и запускаю проект..
12-12 08:56:16.096 30610-30628/root.googlemap E/Google Maps Android API﹕ Authorization failure. Please see 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 ()
Ensure that the "Google Maps Android API v2" is enabled.
Ensure that the following Android Key exists:
API Key: AIzaS***********************
Android Application (<cert_fingerprint>;<package_name>): 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 = включен
Я пробывал еще в jdk прописывать keytool -list -v -keystore mystore.keystore
вот и SHA1 certificate был таким же как и сгенерила андроид студия... Помогите пожалуйста разобраться
Добавлено через 1 час 53 минуты
Сейчас пробывал запустить примеры из библиотеки D:\Users\59538\Desktop\android-studio\sdk\extras\google\google_play_services\samples\maps
Вот и там сказано в манифесте
XML |
1
2
3
4
5
6
7
| <!-- ** You need to replace the key below with your own key. **
The example key below will not be accepted because it is not linked to the
certificate which you will use to sign this application.
See: [url]https://developers.google.com/maps/documentation/android/start[/url]
for instructions on how to get your own key. -->
<meta-data android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCk2egskjhFGHJKfgs"/> |
|
Я заменил на свой и ничего неработает.. что я делаю нитак?? Опять таже ошибка
Добавлено через 14 минут
lol ВСЕ РАБОТАЕТ