2

我无法构建TypeANumberChallengeGoogle 提供的示例游戏(参见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

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

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

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

1 回答 1

2

通过阅读Google Play 服务指南解决了问题

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

您不能直接使用 SDK 文件夹中的 lib 项目……真是个笑话……

于 2013-07-18T19:26:53.707 回答