3

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

13
  • you should refer to the library project have you done that? Oct 29, 2013 at 10:18
  • how did you do it can you elaborate something night be wrong Oct 29, 2013 at 11:25
  • exacly like step 1.4 in the link : Make sure that the Google Play services and BaseGameUtils library projects are referenced in your Android project. To do this in Eclipse: Right-click your Android project and select Properties > Android. In the Library section, add the google-play-services-lib project and the BaseGameUtils project, then click OK to save.
    – GO VEGAN
    Oct 29, 2013 at 11:28
  • right click properties choose android and check if your libray is referenced and you do have a green tick for the same Oct 29, 2013 at 11:32
  • look at the picture in my second update. I think the refernce is ok
    – GO VEGAN
    Oct 29, 2013 at 11:57

1 Answer 1

2

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.