Import error com.google.android.gms. *;

I am trying to implement a solution in a link

The following data is required to be imported:

import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks; import com.google.android.gms.common.GooglePlayServicesClient.OnConnectionFailedListener; import com.google.android.gms.location.ActivityRecognitionClient; 

I cannot compile because eclipse does not recognize

  "com.google.android.gms."...... 

Also updated SDK and Google API to the latest version (4.3)

Still unable to import the package.

+7
java android sdk google-api importerror
source share
3 answers

Follow this guide to set up the Google Play Services SDK. This is the client library that you should get from the SDK manager. After downloading it, add the library as a project.

+8
source share
  • Import the Google Play service as C:\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\sdk\extras\google\google_play_services

  • Choose libproject

  • Select your project, go to properties, and in Android add the Google Play service library.

NOTE. You need to install the Google Play service from the SDK manager.

+3
source share

To add all the answers, make sure android-support-v4.jar is the same in both the MainProject project and the library. If they differ, the library project libraries will not be added to your apk, and you may get a class error not found.

+1
source share

All Articles