First get the Configuration File for Sign-in from

Open link below

https://developers.google.com/identity/sign-in/android/start-integrating

click on get A configuration file

Download the configuration file and place the file in app/ folder of your project

  1. Add the dependency to your project-level build.gradle:

classpath ‘com.google.gms:google-services:3.0.0’

  1. Add the plugin to your app-level build.gradle:(bottom)

apply plugin: ‘com.google.gms.google-services’

  1. add this dependency to your app gradle file

dependencies { compile ‘com.google.android.gms:play-services-auth:9.8.0’ }