2013-07-18 89 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