如何修复身份验证错误Android应用

时间:2018-12-12 18:58:52

标签: android firebase firebase-authentication

image

  

您好,我该如何解决Firebase身份验证错误-“无法解决:firebase-auth-15.0.0”

`apply plugin:'com.android.application'             应用插件:“ com.google.gms.google-services”

        android {
            compileSdkVersion 28
            defaultConfig {
                applicationId "com.anton1111.azot2.antonio_chat"
                minSdkVersion 17
                targetSdkVersion 28
                versionCode 1
                versionName "1.0"
                testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            }
            buildTypes {
                release {
                    minifyEnabled false
                    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                }
            }
        }

        dependencies {
            implementation fileTree(dir: 'libs', include: ['*.jar'])
            implementation 'com.android.support:appcompat-v7:28.0.0'
            implementation 'com.android.support.constraint:constraint-layout:1.1.3'

            implementation 'com.android.support:support-v4:28.0.0'
            implementation 'com.android.support:design:28.0.0'
            implementation 'com.google.firebase:firebase-auth:16.1.0'
            implementation 'com.google.firebase:firebase-database:16.0.5'
            implementation 'com.google.firebase:firebase-storage:16.0.5'
            implementation 'com.google.firebase:firebase-core:16.0.6'
            implementation 'com.android.support:cardview-v7:28.0.0'
            implementation 'com.rengwuxian.materialedittext:library:2.1.4'


            testImplementation 'junit:junit:4.12'
            androidTestImplementation 'com.android.support.test:runner:1.0.2'
            androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
            implementation 'com.google.firebase:firebase-auth:16.0.1'

        }`

3 个答案:

答案 0 :(得分:1)

您的依赖项有两次相同的实现

 implementation 'com.google.firebase:firebase-auth:16.1.0'

implementation 'com.google.firebase:firebase-auth:16.0.1'

删除最后一个,然后让firebase-auth:16.1.0

您在照片中发布的版本有两个版本,这就是导致错误的原因

  implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0' <--- 16.0.1 and 15.0.0

删除一个版本,仅使用最新版本

implementation 'com.google.firebase:firebase-auth:16.1.0'

答案 1 :(得分:0)

Firebase 网站上用于gradle的稳定版本是:

implementation 'com.google.firebase:firebase-auth:16.0.5'

您应该尝试一下是否可行。

答案 2 :(得分:0)

FireBAse 上用于gradle的最新稳定版本是:

实现'com.google.firebase:firebase-auth:16.0.5'

您应该提供它,有关更多详细信息,请参见link