GoogleApiClient在连接时调用connect(),缺少disconnect()

问题描述 投票:0回答:1

1)在仍然连接时调用connect(),缺少disconnect()。此错误发生在以下场景中,

  1. 关闭Wifi并首次启动我的应用程序。
  2. 我尝试连接Activity的GoogleAPiClient onCreate()
  3. 出现错误对话框,网络错误:连接到GoogleApiClient需要数据连接。
  4. 所以打开WIFI,再次打开我的应用程序。
  5. 得到connect()仍然连接,缺少disconnect()错误。

根据我发现的调试,发生这种情况时,不会调用任何GoogleApiClient连接回调方法。

注意:如果我从设备中删除了我的Google帐户并再次添加,则不会发生此错误。我也使用旧版本的Google Play服务。它会影响任何东西。(因为我在我的应用程序中使用了LocationClient API,我无法更新到新的Google Play服务,因为它已更新到LocationServices API)

android google-play-services google-drive-android-api
1个回答
1
投票

当Google Play服务应用中的所有数据都被删除时,Poblem就解决了。我认为,问题在于游戏服务会记住每个具有成功授权的应用程序。但是您的应用程序未成功授权,或在早期版本中获得授权。

© www.soinside.com 2019 - 2024. All rights reserved.