Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android - import - with developers google com games

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.

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

In the lines:

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.

This is how the project look now: Edit 1:

enter image description here

Edit 2:

enter image description here

Edit 3:

enter image description here

like image 943
GO VEGAN Avatar asked Dec 06 '25 03:12

GO VEGAN


1 Answers

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.

like image 99
Jesse Avatar answered Dec 07 '25 18:12

Jesse