【问题标题】:Google Player Game Service Error: Can't build the sample gameGoogle Player 游戏服务错误:无法构建示例游戏
【发布时间】:2013-07-18 18:49:29
【问题描述】:

我无法构建 Google 提供的示例游戏 TypeANumberChallenge(请参阅 GitHub)。收到以下错误消息:

The project was not built since its build path is incomplete. Cannot find the class file for com.google.android.gms.games.GamesClient. Fix the build path then try building this project

The type com.google.android.gms.games.GamesClient cannot be resolved. It is indirectly referenced from required .class files    MainActivity.java   /TypeANumber/src/com/kerrywei/games/tanc

我确实包含了readme 和Google Play Services Guides 所描述的项目库BaseGameUtils 和google-play-services-lib,但仍然出现错误,并且不能只编译...

更新: 我尝试删除TypeANumberChallenge 并重做整个过程,但在尝试将BaseGameUtils 添加为库时出现新错误:

An internal error occurred during: "Android Library Update".
Path must include project and resource name: /BaseGameUtils

【问题讨论】:

    标签: android google-play-games build-error


    【解决方案1】:

    通过阅读Google Play Services Guides解决问题

    1. 制作 Google Play 服务库项目的副本。将库项目复制到 <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ 到您维护 Android 应用项目的位置。如果你 正在使用 Eclipse,将库项目导入您的工作区。 点击 File > Import,选择 Android > Existing Android Code into 工作区,然后浏览到库项目的副本以将其导入。

    您不能直接使用 SDK 文件夹中的 lib 项目... 开什么玩笑。。

    【讨论】:

    • 如果您要更新 google-play-services_lib,您将需要重新导入项目。新版本更新不会自动添加到 Eclipse 工作区,只会添加到 SDK 文件夹,因此您的其他 Eclipse 项目不会看到。
    猜你喜欢
    • 2016-07-28
    • 2013-12-23
    • 2017-10-18
    • 2015-05-08
    • 2019-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-13
    相关资源
    最近更新 更多