0

I am trying to setup Google play services using their android-sample project. I had successfully imported BaseGameUtils and also the google_play_services_lib . After that i imported the sample project Collect all the stars (and added the BaseGameUtils to its build target) to test it. But It is giving me error ( -- cannot be resolved) on following two imports

import com.google.android.gms.appstate.AppStateClient;
import com.google.android.gms.appstate.OnStateLoadedListener;

I even try to import other example projects but they all are showing same error. Below is a snapshot of error. enter image description here

Khayam Gondal
  • 2,366
  • 2
  • 28
  • 40
  • check link http://stackoverflow.com/questions/15990075/the-import-com-google-android-gms-cannot-be-resolved – duggu Apr 29 '14 at 04:54

2 Answers2

0

just restart the eclipse and it will build the work space. This helped to solve the issue.

Jiju Induchoodan
  • 4,236
  • 1
  • 22
  • 24
  • I did that many times but that doesn't helped. Errors are just on two mentioned imports all other goolgle-play-services related imported are fine ,which means that these two specific classes are missing from imported project – Khayam Gondal Apr 29 '14 at 05:08
0

I think your problem is with google Play services library project it is not updated

Remove Library From your Project after that open the sdk manager and downloads any update for Google Play Services

then import the google play services library project from the following path

..../sdk/extras/google/google_play_services/libproject/google-play-services_lib

to your workspace and build and add this project as a library project to your application project

after clean your application and build and run it should work.....

Sandy
  • 985
  • 5
  • 13