首页 > 解决方案 > 我如何修复身份验证错误android应用程序

问题描述

图片

嗨,我如何修复 Firebase 身份验证错误 - “无法解决:firebase-auth-15.0.0”

`应用插件:'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'

        }`

标签: androidfirebasefirebase-authentication

解决方案


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

 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'

推荐阅读