Проблемы с Firebase Gradle Builds - PullRequest
0 голосов
/ 14 мая 2018

Итак, я просмотрел кучу статей, в которых есть решения для этой проблемы, но не получил ни одной работы. Я получаю сообщение об ошибке при использовании библиотек Firebase Messaging и Firestore с Google Pay Services Location и Maps. Всякий раз, когда я собираю проект, возвращается следующая ошибка:

Нет виртуального метода zzbqp () Ljava / lang / String; в классе Lcom / Google / firebase / FirebaseApp; или его суперклассы (объявление "com.google.firebase.FirebaseApp" появится в /data/app/skutl.me.client-P4tdXC_WHOrJdSuzHJKp9Q==/base.apk)

Ниже приведены мои файлы конфигурации gradle:

Файл проекта верхнего уровня

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:3.2.1'

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

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com" // Google's Maven repository
        }
        google()
    } }

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

Файл сборки приложения

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "skutl.me.client"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    google()
    jcenter()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "https://maven.google.com" }
}

dependencies {
    implementation 'com.google.android.gms:play-services-location:15.0.1'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'

    implementation 'com.firebaseui:firebase-ui-auth:3.1.3'
    implementation 'com.google.firebase:firebase-messaging:15.0.2'
    implementation 'com.google.firebase:firebase-firestore:16.0.0'

    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.android.support:design:27.0.2'
    implementation 'com.android.support:support-compat:27.0.2'


    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.android.support:multidex:1.0.1'

    implementation 'com.android.volley:volley:1.1.0'
    implementation 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
    testImplementation 'junit:junit:4.12'
}

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

Я пытался сделать их все одного уровня, но ни одна из библиотек не имеет одинаковых версий для v15 или v16. Любое понимание этих ошибок?

1 Ответ

0 голосов
/ 14 мая 2018

Изменить это:

implementation 'com.firebaseui:firebase-ui-auth:3.1.3'

к этому

implementation 'com.firebaseui:firebase-ui-auth:3.3.1'

Это правильная версия для firebase v15, см. repo

Также, как подсказывает @JamesPoang, вам нужно ядро ​​Firebase:

implementation 'com.google.firebase:firebase-core:15.0.2'
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...