this steps should solve it
<<<<<<<<<< gradle:project >>>>>>>>>>
Change this line
classpath 'com.google.gms:google-services:4.1.0'
With this line
classpath 'com.google.gms:google-services:4.2.0'
I think there is a bug with google play services version 4.1.0
make sure to put apply plugin: 'com.google.gms.google-services'
in app gradle