【发布时间】:2013-08-19 05:14:16
【问题描述】:
我正在使用 Google Play LocationClient。我已经按照文档中的说明在 onCreate() 中对其进行了初始化:
mLocationClient = new LocationClient(this, this, this);
我正在 onStart() 中进行连接
mLocationClient.connect();
它在我的 Android 手机上运行良好,但在开发者控制台中,我看到 connect()line 中发生了 NullPointerException。
怎么会这样?
【问题讨论】:
-
你能发布更多代码吗?
-
onCreate() 中发生了很多事情。初始化 TextViews、Variables、ActionBar、Fragments、... 不知道这会有什么帮助。它适用于我的设备和另一个设备
-
发布您看到的异常的 LogCat 输出
标签: android android-maps-v2 google-play-services android-location