I migrated to Android Studio 3 and Gradle 4. Then I changed compile to implementation in my build.gradle files. But I get the error:
Changing the version of google-services over the top level gradle file fixed the issue for me. It seems the older version is indirectly injecting the firebase-core versions and updating the firebase version explicitly makes the conflict
classpath 'com.google.gms:google-services:4.0.2' // Just updated the version here.