Cannot resolve symbol 'FusedLocationProviderClient'

纵然是瞬间 提交于 2019-12-24 03:21:11

问题


I having a errorCannot resolve symbol 'FusedLocationProviderClient' while declaring

private FusedLocationProviderClient mFusedLocationClient;

The same is asked here Cannot Resolve Symbol: FusedLocationProviderClient. Google play services version used 11.0.1 . But still am having the error while using the latest play services.


回答1:


FusedLocationProvider is part of play-services-location. You are using play-services-maps. Add dependency :

compile 'com.google.android.gms:play-services-location:11.6.0'

Edit

Seems like this was helpful for quite a few people. Here is a link to google docs where all individual library names in play-services along with latest version numbers are kept : https://developers.google.com/android/guides/setup I hope google keeps it updated.

Note: It's recommended to use Google Play services version 11.6.0 or higher, which includes bug fixes for this class. More details here.

https://developers.google.com/android/reference/com/google/android/gms/location/FusedLocationProviderClient



来源:https://stackoverflow.com/questions/45963165/cannot-resolve-symbol-fusedlocationproviderclient

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!