android - 无法在 Android Studio 中解析符号 'LocationClient'

标签 android android-studio google-play-services location-client location-services

我在 Android Studio 中开发我想在其中使用位置服务的应用程序时遇到此错误。
我知道这个问题之前已经被问过,但我相信之前的问题是在 Eclipse 中开发的应用程序。

我相信这可能是 Google Play 服务设置的问题
我已按照此处的说明进行操作 http://developer.android.com/google/play-services/setup.html但我现在收到错误消息。

这可能与我之前通过 SDK 管理器在 eclipse 中安装 Google Play 服务有关吗?

任何帮助将不胜感激,谢谢

最佳答案

LocationClient 已于几个月前从 Play Services SDK 中删除。您现在使用 GoogleApiClientLocationServices.APIFusedLocationProviderApi 访问 Play 服务中的融合位置提供程序。 This sample project演示了如何从这个新 API 获取位置修复,其使用也包含在 this blog post 中。 .

关于android - 无法在 Android Studio 中解析符号 'LocationClient',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29007671/

相关文章:

android-studio - 构建项目时获取源和目标必须是不同的错误

java - Google places API 返回单一类型 "car_repair"

android - 使用 LocationSettingsRequest 请求高精度位置不更新位置设置

java - 无法在 Android Studio 中使用 BaseGameActivity

Android不同的屏幕尺寸和不同的密度

android - 如何使用 Retrofit 2.0 (Kotlin) 正确解析嵌套的 JSON 对象?

android - 如何使用 ndk-gdb 调试 native 代码

android - android-keystore 的密码是否为空?

android - 找不到处理 Intent act=android.intent.action.OPEN_DOCUMENT 的 Activity

android - Play 商店应用详细 View 中的游戏功能部分