相关疑难解决方法(0)

用于地理编码的Maps API密钥不再有效?

似乎Google API控制台中生成的密钥不再有效.使用不同的密钥(尝试使用服务器和浏览器密钥,但服务器密钥是我需要的),从不同的帐户生成我不断得到以下错误:

使用服务器密钥时出错:

{
   "error_message" : "This site or IP is not authorized to use this API key.",
   "results" : [],
   "status" : "REQUEST_DENIED"
}
Run Code Online (Sandbox Code Playgroud)

使用浏览器密钥时出错:

{
   "error_message" : "The provided API key is expired.",
   "results" : [],
   "status" : "REQUEST_DENIED"
}
Run Code Online (Sandbox Code Playgroud)

这些是此帐户/项目上启用的服务:http://upload.uprise.nl/et2j

这是我正在尝试的网址:https://maps.googleapis.com/maps/api/geocode/json?address = 900 + Maple + Avenue%2C + L7S + 2J8 + Burlington +%28Ontario%29%2C +加拿大电影= UTF8&传感器=假键=的myKey

如果没有密钥,它将一直工作,直到达到我的每日限制(导致OVER_QUERY_LIMIT状态).

有更多的人遇到这种情况吗?

google-maps google-geocoding-api

14
推荐指数
3
解决办法
2万
查看次数

未使用Google Places API获取商家信息数据 - 此API项目无权使用此API

我正在使用此处提出的问题的代码自动完成textview google places api description - > place_id.我更改了代码以将其添加到我的应用程序中.当我运行代码时,它在我运行代码时给出了以下响应

07-28 11:17:19.244: E/result(350): {"error_message":"This API project is not authorized to use this API. Please ensure that this API is activated in the APIs Console: Learn more: https:\/\/code.google.com\/apis\/console","predictions":[],"status":"REQUEST_DENIED"}
Run Code Online (Sandbox Code Playgroud)

我搜索了一些线程,并从下面的线程

  1. 用于地理编码的Maps API密钥无法正常工作
  2. 此IP,站点或移动应用程序无权使用此API密钥 和一个或两个其他API密钥

我按照建议做了以下步骤.

  1. 从控制台创建服务器密钥并将其添加到项目中.
  2. Places API从控制台启用.
  3. Geocoding API从控制台启用.

您可以在下图中看到. 在此输入图像描述

当我运行代码时,它仍然显示上面提到的错误.我是否需要从控制台启用任何其他API.

除此之外,地图工作得很好.如果您想知道这是我在清单中添加的api密钥.

<!-- Goolge Maps API Key Development mode -->
            <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyAbo3luzbyQTuuPLOyo_Ml***********" />
Run Code Online (Sandbox Code Playgroud)

我正在直接添加服务器密钥以请求URL,如下所示

private ArrayList<String> autocomplete(String input) {
ArrayList<String> resultList = null;
    HttpURLConnection conn …
Run Code Online (Sandbox Code Playgroud)

android autocompletetextview google-geocoding-api google-places-api google-maps-android-api-2

0
推荐指数
1
解决办法
1277
查看次数