問題描述
Google Player 遊戲服務錯誤:無法構建示例遊戲 (Google Player Game Service Error: Can't build the sample game)
我無法構建 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
我確實包含 自述文件 和 Google Play Services Guides,但仍然出現錯誤,無法編譯...
更新:
參考解法
方法 1:
Problem solved by reading Google Play Services Guides
- 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.
You CANNOT use the lib project in SDK folder DIRECTLY... What a joke..