有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Firebase实时数据库和身份验证库版本不兼容

重要提示:
我读了这篇{a1}但是这些答案都没有解决我的问题。与Android Build execution failed due to incompatible library versions相同

我想将我的应用程序连接到firebase实时数据库,并添加带有电话号码和电子邮件的身份验证。当我添加构建时。实时数据库的我的应用程序模块中的渐变依赖项没有问题,但当我添加身份验证依赖项时,我收到以下消息: error_message_screenshot 问题是,我已经在同一版本中添加了这些库(我将它们都放在15.0.0中),但即使在同步之后,我也会收到相同的消息。 我能做些什么来解决这个问题? 这是我的gradle:(注释部分是在firebase上找到的另一种方法,我尝试过,但也不起作用)

apply plugin: 'com.安卓.application'

安卓 {
    compileSdkVersion 27
    defaultConfig {
        applicationId "finalproject.mad.com.myapplication"
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "安卓.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-安卓.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.安卓.support:appcompat-v7:27.1.1'
    implementation 'com.安卓.support.constraint:constraint-layout:1.1.0'
    implementation 'com.安卓.support:design:27.1.1'

    implementation 'com.google.firebase:firebase-iid:15.0.0'
    implementation 'com.google.安卓.gms:play-services-measurement-base:15.0.0'
    implementation 'com.google.firebase:firebase-database:15.0.0'
    implementation 'com.google.firebase:firebase-auth:15.0.0'

    /*implementation "com.google.firebase:firebase-auth:15.0.0"
    implementation "com.google.安卓.gms:play-services-auth:15.0.0"


    implementation "com.安卓.support:design:27.1.1"
    implementation "com.安卓.support:customtabs:27.1.1"
    implementation "com.安卓.support:cardview-v7:27.1.1"

    implementation "com.google.firebase:firebase-database:15.0.0"

    implementation "com.安卓.support:recyclerview-v7:27.1.1"
    implementation "com.安卓.support:support-v4:27.1.1"*/

    testImplementation 'junit:junit:4.12'
    安卓TestImplementation 'com.安卓.support.test:runner:1.0.2'
    安卓TestImplementation 'com.安卓.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'

编辑:更新Android Studio修复了我的问题


共 (1) 个答案