【问题标题】:android - import - with developers google com gamesandroid - 导入 - 与开发人员 google com 游戏
【发布时间】:2013-11-08 10:13:06
【问题描述】:

我按照这里的指南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:

编辑 2:

编辑 3:

【问题讨论】:

  • 你应该参考图书馆项目你做过吗?
  • 你是怎么做到的,你能详细说明一下晚上有什么问题吗
  • 与链接中的步骤 1.4 完全一样:确保您的 Android 项目中引用了 Google Play 服务和 BaseGameUtils 库项目。要在 Eclipse 中执行此操作: 右键单击​​您的 Android 项目并选择 Properties > Android。在 Library 部分,添加 google-play-services-lib 项目和 BaseGameUtils 项目,然后点击 OK 保存。
  • 右键属性选择android并检查你的libray是否被引用并且你确实有一个相同的绿色勾号
  • 看我第二次更新的图片。我认为参考还可以

标签: android google-play-games


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2017-06-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-10
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    相关资源
    最近更新 更多