O'Reilly logo

Android Studio Essentials by Belén Cruz Zapata

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Google Play services to Android Studio

The first thing we need to know is what we need to add to our Android Studio. We have just learned that the APK is available in the Google Play store and it is the actual runtime of the services. We, as developers, only need this package in our testing device while debugging our application. What we need to add to Android Studio is the Google Play services client library.

This library has to be declared as a dependency to your application, so perform the following steps:

  1. Open the build.gradle file for your application module (/app/build.gradle).
  2. Type the following line inside the dependencies block:
    dependencies {
       …
       compile 'com.google.android.gms:play-services:5.+'
    }

    The latest Google Play services version ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required