我按照这里的指南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:
最佳答案
您可能没有在 BaseGameUtils 库中引用 google_play_services。右键单击 BaseGameUtils。选择属性 > Android。添加 google-play-services-lib 项目。点击确定保存。
关于android - import - with developers google com games,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19655133/