In plugin 'com.google.gms.google-services' type 'com.google.gms.googleservices.GoogleServicesTask' field 'intermediateDir' without corresponding getter has been annotated with @OutputDirectory
Upgrading google-services to 4.3.8 fixed this issue for me.
dependencies {
classpath 'com.google.gms:google-services:4.3.8'
}
Taken from: https://stackoverflow.com/a/68713121