Google Player 游戏服务错误:无法构建示例游戏

2024-02-21

我无法构建示例游戏TypeANumberChallenge由 Google 提供(参见GitHub https://github.com/playgameservices/android-basic-samples/tree/master/BasicSamples/TypeANumber)。收到以下错误消息:

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和 google-play-services-lib 如所述readme https://github.com/playgameservices/android-basic-samples and Google Play 服务指南 https://developers.google.com/android/guides/setup,但仍然出现错误,并且无法编译...

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

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

问题通过阅读解决Google Play 服务指南 https://developers.google.com/android/guides/setup

  1. 复制 Google Play 服务库项目。将库项目复制到<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/到您维护 Android 应用程序项目的位置。如果你 使用 Eclipse,将库项目导入到您的工作区。 单击“文件”>“导入”,选择“Android”>“现有 Android 代码导入” 工作区,然后浏览到库项目的副本以将其导入。

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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Google Player 游戏服务错误:无法构建示例游戏 的相关文章

随机推荐