Error :"Configuration 'compile' is obsolete and has been replaced with 'implementation'.", even though no 'compile' present in gradle

I solved by changing classpath inside build.gradle (Project: your Project name)

from 
  classpath 'com.google.gms:google-services:3.1.1' 
to
  classpath 'com.google.gms:google-services:3.2.0'


The problem lies in apply plugin: 'com.google.gms.google-services'

The Google Services plugin is adding a dependency on behalf of you. Hopefully they fix it in the future.

I copy answer from below stackoverflow link. https://stackoverflow.com/a/49059867/4782538. Thanks @Niklas for answer.