Пара вещей.
УРОВЕНЬ УРОВНЯ ПРОЕКТА. GRADLE
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.31"
classpath 'com.google.gms:google-services:3.2.1'
}
Я бы предложил понизить вашу версию до 3.2.1, поскольку в 3.3.1 есть известные проблемы, влияющие на компиляцию вокруг модулей, разновидностей и многого другого.
Во-вторых, покажите, что вы правильно применили плагин в модуле build.gradle.
ПРИМЕР НИЖЕ:
МОДУЛЬ УРОВНЯ СТРОИТЬ. GRADLE
dependencies {
implementation 'com.google.firebase:firebase-crash:15.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
kapt "com.android.databinding:compiler:3.1.2"
//to compile @synchronized things and java references
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.31"
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.barteksc:android-pdf-viewer:2.7.0'
implementation 'com.wajahatkarim3.EasyFlipView:EasyFlipView:2.0.5'
// [START firebase]
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-appindexing:15.0.1'
implementation 'com.google.android.gms:play-services-base:15.0.1'
// [END firebase]
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true
}
apply plugin: 'com.google.gms.google-services'
}
Конечно, вы заботитесь только о частях Google gms, поэтому убедитесь, что у вас есть этот плагин и зависимость.