迁移到AndroidX后,Firebase Auth问题

时间:2019-10-12 00:01:24

标签: android firebase firebase-authentication androidx

我在应用程序中使用Firebase Auth,数据库。迁移到AndroidX后,我得到

ERROR: Manifest merger failed with multiple errors, see logs

当我添加firebase-database时,它可以正确构建,但是唯一的问题是firebase-auth:

implementation "com.google.firebase:firebase-auth:19.1.0"

我尝试在清单com.google.firebase中添加overrideLibrary,例如:

    <uses-sdk tools:overrideLibrary="androidx.browser, com.afollestad.materialdialogs, io.nlopez.smartlocation, io.noties.markwon, com.github.saeedjassani, com.google.firebase" />

但是那也不起作用。

这是我的build.gradle:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"

    dexOptions {
        maxProcessCount 2
        javaMaxHeapSize "2g"
    }
    defaultConfig {
        applicationId "com.developer110.shiacompanion"
        minSdkVersion 14
        targetSdkVersion 29
        versionCode 44
        versionName "2.4.0"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            applicationIdSuffix ".debug"
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }
}

tasks.whenTaskAdded { task ->
    if (task.name.equals("lint")) {
        task.enabled = false
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.preference:preference:1.1.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.bluelinelabs:logansquare:1.3.7'
    annotationProcessor 'com.bluelinelabs:logansquare-compiler:1.3.7'
    implementation 'de.hdodenhof:circleimageview:3.0.1'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.android.volley:volley:1.1.1'
    implementation 'de.psdev.licensesdialog:licensesdialog:2.1.0'
    implementation "com.google.android.gms:play-services-auth:17.0.0"
    implementation 'com.google.android.gms:play-services-location:17.0.0'

    testImplementation 'junit:junit:4.12'
    implementation 'io.nlopez.smartlocation:library:3.3.3'
    implementation 'com.github.bmoliveira:snake-yaml:v1.18-android'
    implementation 'com.pavelsikun:material-seekbar-preference:2.3.0'
    implementation 'com.synnapps:carouselview:0.1.4'
    implementation 'com.github.saeedjassani:expandablelayout:1.0.4'
    implementation "io.noties.markwon:core:4.1.1"


    implementation "androidx.browser:browser:1.2.0-alpha08"
    implementation "com.google.firebase:firebase-database:19.1.0"
    implementation "com.google.firebase:firebase-auth:19.1.0"


}

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

任何帮助将不胜感激,谢谢

0 个答案:

没有答案