Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/180.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 放置自动完成状态代码9001_Android_Google Places Api - Fatal编程技术网

Android 放置自动完成状态代码9001

Android 放置自动完成状态代码9001,android,google-places-api,Android,Google Places Api,我试图使用Google Play Services中的places Autocomplete API获取位置预测,但我得到的状态是: Status{statusCode=unknown status code: 9001, resolution=null} 知道发生了什么吗?我也有同样的问题。我还可以看到这些日志: 03-2608:58:48.56426494-3999/?W/地方﹕ f、 a:633:GLOCREPLYLEment未成功状态:1 03-26 08:58:48.564 26

我试图使用Google Play Services中的places Autocomplete API获取位置预测,但我得到的状态是:

Status{statusCode=unknown status code: 9001, resolution=null}

知道发生了什么吗?

我也有同样的问题。我还可以看到这些日志:

03-2608:58:48.56426494-3999/?W/地方﹕ f、 a:633:GLOCREPLYLEment未成功状态:1 03-26 08:58:48.564 26494-3999/? W/地方﹕ f、 a:660:gPlaceQueryResult未成功响应代码:27

也许它会有用。我只是想让你知道你并不孤单,让你感觉更好

更新:

我刚刚注意到我在所有设备上都收到了此日志消息:

03-26 10:22:33.774 26494-26721/?E/MDM﹕ [20882]b.run:无法连接到Google API客户端:ConnectionResult{statusCode=API\u不可用,分辨率=null}

也许Google Places API目前存在问题。这个图书馆似乎还未建成。例如,位置类型只有3个常量(PlaceTypes.ALL、PlaceTypes.zzanS和PlaceTypes.zzanR),最后2个对我来说没有意义。

下面是解决方案

  • 在API控制台中启用“PlacesAPIfor Android
注意:无论如何,启用它的开关只能在旧式控制台中找到

更新 您可以通过在搜索栏中键入“Places API for Android”来找到此选项。

哈哈,我启用了“Places API”而不是“Places API for Android”。谢谢。:)