on build.gradle
//use the older version instead
classpath 'com.android.tools.build:gradle:3.1.4'
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}