2013-07-18 122 views
2

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

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 

我确实包括项目库BaseGameUtils以及由readmeGoogle Play Services Guides描述,但仍然得到了错误,而不能随便编的Google Play服务-lib目录下。 ..

更新: 我试图删除TypeANumberChallenge和重做整个过程中,得到了尝试添加BaseGameUtils为库时,新的错误:

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

回答

2

问题通过阅读Google Play Services Guides

  1. Make a copy of the Google Play services library project. Copy the library project at <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects. If you are using Eclipse, import the library project into your workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.

您不能使用的lib项目直接SDK文件夹... 真是笑话解决..

+0

如果要更新的谷歌播放,services_lib你会需要重新导入项目。新版本更新不会自动添加到Eclipse工作区,只会添加到SDK文件夹,因此您的其他Eclipse项目将无法看到。 – dmanxiii