PaLaCoRDa adlı üyeden alıntı: mesajı görüntüle
Gradle dosyasındaki compile yazan yerleri implementation yapman gerekiyor.

Örnek:
implementation 'com.android.support:appcompat-v7:25.0.0'
testImplementation 'junit:junit:4.12'
Eski hali
compile 'com.android.support:appcompat-v7:25.0.0'
testCompile 'junit:junit:4.12'
compile değiştir implementation
testCompile değiştir testImplementation
debugCompile değiştir debugImplementation
androidTestCompile değiştir androidTestImplementation
Bunlarla o hatanın alakası yok yalnız. Firebase'den aldığınız google-play-services.json içerisindeki paket adı ile uygulama paket adı uyuşmayınca meydana gelen hata.
Hata mesajı zaten söylüyor ne olduğunu.