Install the Google Play Services SDK In Android Studio

10:32:00 AM , 1 Comments

Google Play services 4.2 has now been rolled out to the world, and it’s packed with much-anticipated
features such as the brand new Cast API and the updated Drive API.
In this post, we'll take a look at the new Google Play services client APIs and what they mean for your apps — for details be sure to read Accessing Google Play services and the API reference documentation.
To install the Google Play services SDK for development:

Launch the SDK Manager in one of the following ways:

In Android Studio, click SDK Manager undefined in the toolbar.

Install the Google Play services SDK
Scroll to the bottom of the package list, expand Extras, select Google Play services, and install it.
If you're using Android Studio, also install Google Repository (it provides the Maven repository used for Gradle builds).

Google Play Service & Google Repository Install Screen

The Google Play services SDK is saved in your Android SDK environment at
C:\Program Files\Android\android-studio\sdk\extras\google.

Google Play service SDK path for local Disk(C)
Install a compatible version of the Google APIs platform
If you want to test your app on the emulator, expand the directory for Android 4.2.2 (API 17) or a higher version, select Google APIs, and install it. Then create a new AVD with Google APIs as the platform target.

Google APIs Screen for Android4.22(API version 17)

Now we are ready to start using Google Play Service In android studio application development. For using Google Play Service in your apps simple flowing this next steep:
Using Google Play Service in Gradle Build Application
Import your project in the android studio. I will show you using google play service Gradle build project. here in this project you should see the new Gradle build project structure

Build Gradle PhoneGap Project in android studio structure

Library Project:  1. /lib/ add here Google Play service jar file. copy google-play-service.jar file here from 

C:\Program Files\Android\android-studio\sdk\extras\google\google_play_services\libproject\google-play-services_lib\libs
 . in here see the image in option 1 lib section.
Save the changes and click Sync Project with Gradle Files in the toolbar.
Now open the build.gradle file inside your application module directory.
See Image 3 Options build.gradle.
Add a new build rule under dependencies for the latest version of play services. For example

build.gradle file dependencies rule adding line

Be sure you update this version number each time Google Play services is updated. for better when you add this line see your downloaded version then add this Like:
Save the changes and click Sync Project with Gradle Files in the toolbar.

Open your app's manifest file and add the following tag as a child of the element:
Now need to prevent proguard exception from stripping away required classes,

Open Proguard-rule.tex file See android studio structure Image 4 Number Option and now add the following lines in the Proguard-rule
-keep class * extends java.util.ListResourceBundle {
    protected Object[][] getContents();
-keep public class {
    public static final *** NULL;
-keepnames class *
-keepclassmembernames class * { *;
-keepnames class * implements android.os.Parcelable {
    public static final ** CREATOR;

If all steep are successfully done than your project has able to use google play service .if you have any trouble in applying this, please write a comment here I will try to solve your problem.

Abdullah Al Mahamud,

Abdullah Al Mahamud

Abdullah Al Mahamud is a programmer and founder of Thedevline an Inspiration blog since 2014. live in Bangladesh. , 28 years old.He is passionate about Technology and Design.He work on the freelancing marketplace as a freelancer and has also written for this blog.. Know more

Let's get connected with: Facebook Twitter Google+ Instagram

Content may not be re-published without permission.
Some pages on this site include affiliate links.


Blogger said...

I have just installed iStripper, and now I can watch the best virtual strippers on my desktop.