请通过更新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'