机器人 - 进口 - 与开发商谷歌COM游戏机器人、开发商、游戏、COM

2023-09-07 12:31:19 作者:朱砂泪.

我跟着导游在这里 https://developers.google.com/games 。 我没有在步骤1中的所有insturction(第1步:下载示例应用程序)。但该项目未编

I'm follow the guide here https://developers.google.com/games. I did all the insturction in step 1 ("Step 1: Download the sample app") but the project isn't compile.

在我导入的谷歌,播放服务,LIB项目和BaseGameUtils项目,他们的R.java文件出现在根目录下。

after I imported the google-play-services-lib project and the BaseGameUtils project, their R.java file appear in gen directory.

在行:

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

我得到的错误:

I get the errors :

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

可能是什么问题。

What could be the problem.

这是该项目现在的样子: 修改1:

This is how the project look now: Edit 1:

编辑2:

修改3:

推荐答案

您可能没有引用google_play_services在BaseGameUtils库。右键单击BaseGameUtils。选择属性> Android系统。加入谷歌,播放服务-LIB项目。点击确定保存。

You probably did not reference google_play_services in your BaseGameUtils library. Right click the BaseGameUtils. Select Properties > Android. Add the google-play-services-lib project. Click okay to save.