In project ‘app’ a resolved Google Play services library dependency
depends on another at an exact version (e.g. “[15.0. 1]”, but isn’t
being resolved to that version. Behavior exhibited by the library will
be unknown.Dependency failing: com.google.android.gms:play-services-flags:15.0.1
-> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.0.1.The following dependencies are project dependencies that are direct or
have transitive dependencies that lead to the art ifact with the
issue.
— Project ‘app’ depends onto com.google.firebase:firebase-firestore@17.1.5
— Project ‘app’ depends onto com.firebaseui:firebase-ui-auth@4.2.0For extended debugging info execute Gradle from the command line with
./gradlew –info :app:assembleDebug to see the dep endency paths to
the artifact. This error message came from the google-services Gradle
plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding
“googleServices { disableVersionCheck = false }” to your b uild.gradle
file.
apply plugin: 'com.android.application'
    android {
        compileSdkVersion 27
        defaultConfig {
            applicationId "myapp.com"
            minSdkVersion 19
            targetSdkVersion 27
            versionCode 11
            versionName "1.1"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            multiDexEnabled true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    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.3'
        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 'com.google.firebase:firebase-firestore:17.1.5'
        implementation 'com.firebaseui:firebase-ui-auth:4.2.0'
    }
    apply plugin: 'com.google.gms.google-services'
    com.google.gms.googleservices.GoogleServicesPlugin 
 项目gradle:
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:4.2.0'
    }
} 
 有人能帮助我吗?
问题是缺少依赖性.添加com.google.firebase:firebase-auth解决了这个问题.
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.3'
    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 'com.google.firebase:firebase-firestore:17.1.5'
//    implementation'com.google.firebase:firebase-core:16.0.6'
//    implementation'com.google.firebase:firebase-storage:16.0.5'
    implementation'com.google.firebase:firebase-auth:16.1.0' => add this line
    implementation 'com.firebaseui:firebase-ui-auth:4.2.0'
}
        
             