使用电子邮件ID和密码使用FireBase进行身份验证:无法合并Dex

问题描述 投票:1回答:1

在为我的项目研究firebase身份验证功能时,我发现了一些新东西。启用电子邮件和密码类型并使用下面给出的firebase库后,它显示了无法合并dex的错误。每当我使用这个库时,我都会收到此错误。

compile 'com.firebaseui:firebase-ui-auth:3.1.0'

该库是否与最新版本的android studio不兼容?

这是我的傻瓜:

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "htl.com.googlemaps"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath true
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.android.gms:play-services-maps:11.4.2'
    compile "com.google.android.gms:play-services-location:11.4.2"
    compile 'com.google.firebase:firebase-core:11.4.2'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.google.firebase:firebase-database:11.4.2'
    compile 'com.google.firebase:firebase-auth:11.4.2'
    compile 'com.google.android.gms:play-services-auth:11.4.2'
    compile 'com.firebaseui:firebase-ui-auth:3.1.0'
    compile 'com.firebase:firebase-client-android:2.5.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
}
apply plugin: 'com.google.gms.google-services'

我还在这个问题上附上了错误的图像。

android android-gradle android-multidex
1个回答
0
投票

你来了

com.android.builder.dexing.DexArchiveMergerException:无法合并dex

  FirebaseUI Version    Firebase/Play Services Version
    3.1.2                   11.6.2
    3.1.0                   11.4.2
    3.0.0                   11.4.2
    2.4.0                   11.4.0

如果你使用'com.firebaseui:firebase-ui-auth:3.1.0',请确保你的Firebase/Play版本是11.4.2

com.google.android.gms:play***:11.4.2
com.google.firebase:firebase***:11.4.2
© www.soinside.com 2019 - 2024. All rights reserved.