【问题标题】:AppStateManager cannot be resolved - Cloud SaveAppStateManager 无法解析 - 云保存
【发布时间】:2014-03-23 23:33:18
【问题描述】:

我无法将云保存添加到我的应用程序。我已经添加了排行榜和成就,所以我的活动扩展了BaseGameActivity。这些是我关注的链接:

https://developers.google.com/games/services/android/cloudsave

https://github.com/playgameservices/android-samples/blob/master/BasicSamples/CollectAllTheStars/src/main/java/com/google/example/games/catt/SaveGame.java

https://developers.google.com/games/services/common/concepts/cloudsave#conflicts

但是,例如,当我键入直接取自示例 AppStateManager.update(getApiClient(), OUR_STATE_KEY, mSaveGame.toBytes()); 的代码时,AppStateManagergetApiClient() 上会出现错误。无法解析 AppStateManager,并且未为 MainActivity 定义 getApiClient()。

我认为部分问题在于 import com.google.android.gms.appstate.AppStateManager; 不存在是我的 google play 服务库。

【问题讨论】:

    标签: java android google-play-services google-play-games


    【解决方案1】:

    我需要做的就是更新BaseGame 库和GooglePlayServices 库。

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 1970-01-01
      • 2016-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-22
      相关资源
      最近更新 更多