我正在使用适用于 Android 的 Google 地图 v2。我想调用方向 api 从 android 设备获取积分。我注册了谷歌控制台密钥,我可以在安卓上查看地图。我使用此键包含在方向 api 调用中,如下所示:
https://maps.googleapis.com/maps/api/directions/json?origin=Toronto&destination=Montreal&sensor=false&key=API_KEY
API_KEY 是我为地图创建的密钥:
但是当我从 android 应用程序请求调用方向 api 时,我得到了这个返回:
{
"error_message" : "This IP, site or mobile application is not authorized to use this API key.",
"routes" : [],
"status" : "REQUEST_DENIED"
}
如何解决此错误?请帮忙
谢谢