谷歌玩家游戏服务错误:无法生成示例游戏 [英] Google Player Game Service Error: Can't build the sample game
问题描述
我不能建立由谷歌提供的样本游戏TypeANumberChallenge。得到了以下错误消息:
I can't build the sample game TypeANumberChallenge provided by Google. Got the following error message:
这个项目是没有内置因为它的构建路径是不完整的。无法找到com.google.android.gms.games.GamesClient类文件,修复构建路径然后尝试建立这个项目
"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"
的类型com.google.android.gms.games.GamesClient不能得到解决。这是间接需要的.class文件中引用MainActivity.java / TypeANumber / src目录/ COM / kerrywei /游戏/ TANC
"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以及由 HTTPS描述的Google Play服务-lib目录下:// github.com/playgameservices/android-samples 和 https://开头开发商.android.com /谷歌/播放服务/ setup.html
但仍然得到了错误,而不能随便编..
I did include the project library BaseGameUtils and google-play-services-lib as described by https://github.com/playgameservices/android-samples and https://developer.android.com/google/play-services/setup.html but still got the error, and can't just compile..
更新:
我试图删除TypeANumberChallenge和重做整个过程,并得到了尝试添加BaseGameUtils为库时,新的错误:
期间发生内部错误:Android的库更新。
路径必须包括项目和资源名称:/ BaseGameUtils...
Update: I tried to removed TypeANumberChallenge and redo the whole process and got a new error when trying to add BaseGameUtils as library: "An internal error occurred during: "Android Library Update". Path must include project and resource name: /BaseGameUtils"...
推荐答案
问题通过的 https://developer.android.com/google/play-services/setup.html
4。
使谷歌Play服务库项目的副本。
库项目在/演员/谷歌/ google_play_services / libproject /谷歌播放services_lib /复制到你保持你的Android应用项目的位置。
如果您使用的是Eclipse,导入库项目到工作区。单击文件>导入,选择的Android>现有Android的code到工作区,并浏览到库项目导入它的副本。
Problem solved by https://developer.android.com/google/play-services/setup.html "4. Make a copy of the Google Play services library project. Copy the library project at /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."
您不能使用直接SDK文件夹的lib项目...
真是笑话。
you CANNOT use the lib project in sdk folder DIRECTLY... what a joke..
这篇关于谷歌玩家游戏服务错误:无法生成示例游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!