android - import - with developers google com games

标签 android google-play-games

我按照这里的指南https://developers.google.com/games . 我完成了第 1 步中的所有说明(“第 1 步:下载示例应用程序”),但项目未编译。

导入 google-play-services-lib 项目和 BaseGameUtils 项目后,它们的 R.java 文件出现在 gen 目录中。

行内:

import com.google.android.gms.games.Player;
import com.google.example.games.basegameutils.BaseGameActivity;

我得到错误:

The import com.google.android.gms.games cannot be resolved
The import com.google.example.games.basegameutils.BaseGameActivity cannot be resolved

可能是什么问题。

项目现在是这样的: 编辑 1:

enter image description here

编辑 2:

enter image description here

编辑 3:

enter image description here

最佳答案

您可能没有在 BaseGameUtils 库中引用 google_play_services。右键单击 BaseGameUtils。选择属性 > Android。添加 google-play-services-lib 项目。点击确定保存。

关于android - import - with developers google com games,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19655133/

相关文章:

java - Android SQLite 找不到声明的列

android - Google Play 服务 - 使用哪个最小 sdk

android - 如何从 AsyncTask 返回数据到主线程

android - 布局不显示

android - 如何从当前玩家的 google play 游戏服务排行榜中获取分数?

google-play-services - Google Play 服务 4.1 文档?

java - Google Play 登录始终失败异常 : 4

unity-game-engine - Google Play 服务中基于玩家排名/技能的玩家匹配

Android 购买订阅和入门价

Android MVP - 屏幕方向 - 保留演示者状态