Google Maps API无法检索用户界面 [英] Google Maps API cannot retrieve UI

查看:122
本文介绍了Google Maps API无法检索用户界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建Google地图应用。该应用程序运行,但我无法检索地图用户界面。

日志显示:授权失败。请参阅 https://developers.google.com/maps/documentation/android-api /开始了解如何正确设置地图。
06-16 22:45:50.480 13860-14718 / com.mapsapi.vatsan.googlemapsapidemo E谷歌地图Android API:在Google Developer Console( https://console.developers.google.com
确保已启用Google Maps Android API v2。
确保存在以下Android密钥:
API密钥:******************************* *******
Android应用程序(;):24:85:5A:C0:F8:0D:36:4C:1A:B9:45:B6:21:92:B0:6E:7D :71:55:08; com.mapsapi.vatsan.googlemapsapidemo



我使用了正确的API密钥。

我到底需要做什么?

解决方案

我知道调试和发布的应用程序有不同的键。
i recomend API v3。



试试这个来注册你的api key。

https://console.developers.google.com/flows/enableapi?apiid= maps_android_backend&安培;关键字类型= CLIENT_SIDE_ANDROID&安培; R = 24:85:5A:C0:F8:0D:36:4C:1A:B9:45:B6:21:92:B0:6E:7D:71:55:08%3Bcom。 mapsapi.vatsan.googlemapsapidemo
这可能需要几分钟的时间。然后,您必须在您的Android应用程序Manifiest中设置您的google_maps_key。

 <元数据
android:name = com.google.android.maps.v2.API_KEY
android:value =AIzaSDSSDDDAAD ... Your API KEY/>

如果不工作,并且您正在使用android studio,请尝试创建一个新的Map Activity(它是V3) ,用键和地图工作完成res / values / google_maps_api.xml。
如何创建Google地图


I am trying to build a google maps app. The app runs but I am unable to retrieve the map UI.

Logs shows :Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map. 06-16 22:45:50.480 13860-14718/com.mapsapi.vatsan.googlemapsapidemo 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: ************************************** Android Application (;): 24:85:5A:C0:F8:0D:36:4C:1A:B9:45:B6:21:92:B0:6E:7D:71:55:08;com.mapsapi.vatsan.googlemapsapidemo

I have used the correct API Key.

What exactly i have to do?

解决方案

I know there are diferent keys for debug and released apps. i recomend API v3 too.

Try this to register your api key.

https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=24:85:5A:C0:F8:0D:36:4C:1A:B9:45:B6:21:92:B0:6E:7D:71:55:08%3Bcom.mapsapi.vatsan.googlemapsapidemo It can take some minutes. Then you have to set your google_maps_key in your android app Manifiest.

<meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="AIzaSDSSDDDAAD...Your API KEY" />

If doesnt work and if you are using android studio, try creating a new Map Activity(It's V3), complete res/values/google_maps_api.xml with the key and the map gonna work. How to create google map

这篇关于Google Maps API无法检索用户界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆