android - LocationClient 无法解析为类型

标签 android gps location

所以基本上这是我的问题,我一直在关注此链接 http://developer.android.com/training/location/retrieve-current.html

而且似乎 eclipse 不会识别 LocationClient 类,它甚至不会要求我导入它,当然我实现了 GooglePlayServicesClient.ConnectionCallbacks 和 GooglePlayServicesClient.OnConnectionFailedListener 并且我的 Activity 扩展了 FragmentActivity

我错过了什么吗??

我还发现被覆盖的 onConnected() 方法没有参数,我已经看到了来自各地的例子,我看到它说 onConnected(Bundle bundle) 但我的只是拒绝有参数。 非常感谢任何帮助,thnQ

最佳答案

听起来您可能还没有将 Google Play 服务 SDK 添加到您的项目中。 请参阅 http://developer.android.com/google/play-services/setup.html 处的文档

关于android - LocationClient 无法解析为类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16803062/

相关文章:

java - 当对象被另一种方法处理时管理对象属性的更改

java - 使用 Intent 来启用 GPS 并不总是能正常工作。我该如何修复

javascript - 用户提交位置后重新居中 Google map

android - float 操作按钮不会出现在 < 5 android 版本的设备上

Android Realm 迁移问题: Can an older version of an app get stuck with the data files of a newer version?

android - FileObserver -> onEvent(事件,路径): path is NULL

database-design - 将纬度/经度存储为整数有什么好处?

android - 使用相同的广播设置 2 个接近警报

Android 位置不准确

swift - 为什么 LocationManager 会多次调用 startUpdatingLocation?