无法解析符号"FusedLocationProviderClient" [英] Cannot resolve symbol 'FusedLocationProviderClient'

查看:157
本文介绍了无法解析符号"FusedLocationProviderClient"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到错误在声明

I having a errorCannot resolve symbol 'FusedLocationProviderClient' while declaring

private FusedLocationProviderClient mFusedLocationClient;

此处的要求与此相同无法解析符号:FusedLocationProviderClient. Google Play服务版本使用11.0.1 .但是在使用最新的播放服务时仍然会出错.

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.

推荐答案

FusedLocationProvider是play-services-location的一部分.您正在使用play-services-maps.添加依赖项:

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'

修改

似乎这样对很多人都有帮助.这是Google文档的链接,其中保留了播放服务中所有单独的库名称以及最新版本号:

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.

注意:建议使用11.6.0或更高版本的Google Play服务,其中包括此类的错误修复.这里有更多详细信息.

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

这篇关于无法解析符号"FusedLocationProviderClient"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆