Исправьте конфликт версий, либо обновив версию плагина google-services (информация о последней версии доступна по адресу https://bintray.com/android/android-tools/com.google.gms.google-services/), либо обновив версию com.google.android.gms до 11.8.0 ,
Я попробовал все, но это не работает.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.google.firebase:firebase-database:11.8.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation project(':mysql-connector-java-5.1.45-bin')
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation "com.google.android.gms:play-services-location:15.0.1"
}
apply plugin: 'com.google.gms.google-services'