android - 错误: "getGamesClient() not defined" - trying to run Google's Sample Game

标签 android google-play google-play-services

我正在尝试运行 here 中的 Google Game Play 服务示例.

我已按照说明将 Google Play 服务(最新版本 15)和 BaseGameUtils 作为库项目添加到我的项目中。除了以下内容之外,我没有任何错误:“方法 getGamesClient() 未定义...”

我想我缺少一些图书馆引用资料?任何帮助表示赞赏。我的设置屏幕截图如下。

enter image description here

enter image description here

最佳答案

看起来 8bitartist 示例尚未使用新的 API googleApiClient() 引用进行更新。

我使用此处的代码示例编辑了“getGamesClient()”:https://github.com/playgameservices/android-samples/commit/c2e6a2d66abaece3404f6a7b0e36e634470aca5d

关于android - 错误: "getGamesClient() not defined" - trying to run Google's Sample Game,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22239750/

相关文章:

Android import com.google.android.gms.plus.PlusClient 无法解析

android - 从代码中调用 FEATURE_ACTION_BAR 是否惯用

java - Android:从秒数转换时的日期不正确

android - 更改用于 Firebase 邀请的帐户

android - Google Play Location Service 的 BroadcastReceiver(状态栏的设置)

android - 我的应用违反了 Android 广告 ID 政策

android - 无法删除 android 中 libs 文件夹中的 android-support-v4.jar

iphone - Android + iPhone 产品维护

android - 使用ADB安装Android Build:INSTALL_FAILED_VERSION_DOWNGRADE

android - 应用内计费不起作用 : "IAB Helper is not set up"