all gms/firebase libaries must use the exact same version. Found versions 15.1.0, 15.0.2, 15.0.1, 15.0.0.

You need to update google-service plugin to use:

classpath 'com.google.gms:google-services:3.3.0'

to be able to avoid those errors, also upgrade to android studio 3.1

If you're not using Android Studio 3.1 to develop your app, you will need to upgrade in order to get the correct version checking behavior within the IDE.

more information and steps to follow:

Announcing new SDK versioning

Compilation failed to complete:Program type already present: com.google.android.gms.internal.measurement.zzabn