Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/213.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
Places类已从android play services 9.2.0中删除_Android_Google Play Services - Fatal编程技术网

Places类已从android play services 9.2.0中删除

Places类已从android play services 9.2.0中删除,android,google-play-services,Android,Google Play Services,今天,我将google play services更新为9.2.0。 我犯了个错误 com.google.android.gms.location.places.places 没有找到。这条线断在两条线以下 .addApi(Places.GEO_DATA_API) .addApi(Places.PLACE_DETECTION_API) 关于我在哪里可以找到GEO_DATA_API、PLACE_DETECTION_API的任何线索 提前感谢。截至6月28日,该文档未更新。我建议将play ser

今天,我将google play services更新为9.2.0。 我犯了个错误

com.google.android.gms.location.places.places

没有找到。这条线断在两条线以下

.addApi(Places.GEO_DATA_API)
.addApi(Places.PLACE_DETECTION_API)
关于我在哪里可以找到GEO_DATA_API、PLACE_DETECTION_API的任何线索


提前感谢。

截至6月28日,该文档未更新。我建议将play services库降级到9.0.2。(文件最后更新日期为6月23日)

编辑: 正如爱默生所说

编译'com.google.android.gms:play services places:9.2.0'


将places库添加到您的Gradle中。官方文档中未对其进行更新。

在9.0.2中,“位置”库位于“位置”库中。在9.2中,您需要添加“位置”库作为依赖项:

implementation 'com.google.android.gms:play-services-places:9.2.0'

对于play service 9.2.0 places,导入已从更改为

import com.google.android.gms.location.places;

或者您需要“所有位置”文件夹

import com.google.android.gms.location.places.*;

仅供参考,这也修复了缺少的
LatLng
类。
import com.google.android.gms.location.places.*;