getPlaceDetectionClient(android.app.Activity, com.google.android.gms.location.places.PlacesOptions) 已经被弃用。

3

安卓工作室 3.1.4

placeDetectionClient = Places.getPlaceDetectionClient(this, null);

出现错误:

getPlaceDetectionClient(android.app.Activity, com.google.android.gms.location.places.PlacesOptions) is deprecated

有什么其他的想法可以使用吗?谢谢。
1个回答

6

你读过API参考文档了吗?

getPlaceDetectionClient(Context context, PlacesOptions options)已被getPlaceDetectionClient(Context context)替换。只需删除null参数。

这也不是一个错误,而是一个警告,可以忽略以进行调试。


谢谢,简单而有效。 - King Of The Jungle

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接