Add Google Play services to your project, add dependencies for the latest version of play-services .
apply plugin: 'com.android.application' ... dependencies { compile 'com.google.android.gms:play-services:9.2.0' }
Be sure to update this version number every time you upgrade Google Play services.
As described in the Google Play Services Overview , Google Play provides service updates for users on Android 2.3 and higher through the Google Play Store app. However, updates may not reach all users at once, so your application should check the version available before attempting to execute an API transaction.
You are strongly encouraged to use the GoogleApiClient class to access the functions of the Google Play services. This approach allows you to attach an OnConnectionFailedListener object to your client. onConnectionFailed() callback method to determine if the device has the appropriate version of the Google Play Services APK. If the connection fails due to a missing or outdated version of the Google Play APK, the callback receives an error code, such as SERVICE_MISSING , SERVICE_VERSION_UPDATE_REQUIRED or SERVICE_DISABLED .
source share