评估项目“:app”时出现问题。 > 没有这样的 属性:class 的配置:com.google.gms.googleservices.GoogleServicesPlugin

A problem occurred evaluating project ':app'. > No such property: config for class: com.google.gms.googleservices.GoogleServicesPlugin

我正在为我的 android 应用程序使用 firebase,但当我尝试 运行 该应用程序时出现错误。将 firabase 存储添加到我的项目后。 我收到此错误: 评估项目“:app”时出现问题。

No such property: config for class: com.google.gms.googleservices.GoogleServicesPlugin

我的 build.gradle(:app)

中的依赖项
apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.android.carrental"
        minSdkVersion 23
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}
repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-database:16.0.6'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.google.firebase:firebase-firestore:18.2.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.google.firebase:firebase-auth:16.0.1'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    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-core:16.0.5'
    implementation 'com.google.firebase:firebase-auth:16.0.5'
    implementation 'com.google.firebase:firebase-database:16.0.5'
    implementation 'com.google.firebase:firebase-auth:9.2.1'
    implementation 'com.google.firebase:firebase-storage:19.1.0'
}

com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
apply plugin: 'com.google.gms.google-services'

这是我的 build.gradle :

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
        google()
        jcenter()
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'
        //classpath 'com.android.tools.build:gradle:4.0.2'

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


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files

    }
}

allprojects {
    repositories {
        google()

        jcenter()
        
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

请帮帮我

implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.google.firebase:firebase-auth:9.2.1'
implementation 'com.google.firebase:firebase-storage:19.1.0'   

那些应该是相同的版本并且版本必须兼容:

类路径'com.android.tools.build:gradle:3.3.2' 类路径 'com.google.gms:google-services:4.3.3'