Adding Google Play Services Library to Your Android App

google-play-servicesTo develop an app using the Google Play services APIs, you must add Google Play services Library to your app. Google Play services can be downloaded from the SDK Manager. Once it is downloaded we will import it to our App.

 

( 1 ) Download Google Play Services SDK

  • Lunch Android SDK Manager
    • Click on icon or
    • Go to (ADT/Eclipse) the menu bar Window >> Android SDK Manager
  • In the SDK Manager window
    • Scroll down and expand Extras folder
    • Select Google Play services
    • Click Install Package

 

( 2 ) Import the Library into Workspace

Now you need to import Google Play services library into your app current workspace.

File >> Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it. The Google Play services SDK is saved in your Android SDK environment at <android-sdk>/extras/google/google_play_services/.

Now, you should be able to see the google-play-servies-lib project imported into your workspace.

( 3 ) Add Google Play services to Your App

  • Right-click your App project
  • Select Properties
  • In the Properties window select Android
  • Under the Library section click Add
  • Select google-play-services-lib
  • Click OK