Как устранить ошибку сборки Firebase? - PullRequest
0 голосов
/ 16 февраля 2019

Я попытался создать chatapp с firebase, но когда я пытаюсь запустить приложение на эмуляторе, я получаю это сообщение «Ошибка: введите com.google.firebase.FirebaseApp $ zza, на который ссылается как на интерфейс com.google.android.gms.internal.zzbkv$3».

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.firebasechat"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.firebase:firebase-core:16.0.7'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'

    implementation 'com.google.android.material:material:1.1.0-alpha03'
    implementation 'com.firebaseui:firebase-ui:1.1.1'
    implementation 'com.google.firebase:firebase-auth:16.1.0'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'

    implementation 'com.jakewharton:butterknife:10.1.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
}

1 Ответ

0 голосов
/ 16 февраля 2019

применить плагин: 'com.google.gms.google-services'

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

проверить объявление плагина в Gradleмодуль.и определить classpath для проекта gradle

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...