我很难从Google Places API获得有效的自动填充回复。我正在使用基于[他们的示例}(https://developers.google.com/places/training/autocomplete-android)(其中,有趣的是使用seemingly invalid country code of "uk")的代码。Google Places API自动填充 - REQUEST_DENIED
我在Google代码控制台中启用了Places API。 几个星期前我第一次启用Maps API时生成了我的API密钥,而且我正在使用的MapFragment工作正常,所以我没有理由怀疑API密钥无效。
我使用的URL是https://maps.googleapis.com/maps/api/place/autocomplete/json?input=New+York&sensor=false&key=my_valid_api_key&components=country:us
我总是{"status":"REQUEST_DENIED","predictions":[]}
为我的回应。
我已多次验证我的网址已正确形成并符合Places API autocomplete endpoint的要求,但我没有收到我期待的回复。
我已经看到了一些关于如何解决这个问题的建议,以及如何解决这个问题,但他们都没有为我工作(即 - 使用http而不是https,使用端口443等)我试过这些所有合理的组合,没有变化的反应。
请帮我看看我做错了什么。
可能的复制问题http://stackoverflow.com/questions/14654758/google-位置-api-request-denied-for-android-autocomplete-even-the-the-right-a –