无法解决:firebase-auth-15.0.0

时间:2018-09-25 18:47:49

标签: android firebase gradle firebase-authentication

您好,我是Android开发的新手,我只是想知道如何解决这种问题,因为我需要将我的应用程序连接到firebase。

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

    android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.acemergencyapp.user.aceapp"
    minSdkVersion 14
    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.google.firebase:firebase-core:16.0.3'
implementation 'com.google.firebase:firebase-auth:16.0.3'
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:15.0.0'
  }

我在implementation 'com.android.support:appcompat-v7:28.0.0'中有一条红线

3 个答案:

答案 0 :(得分:2)

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

删除此依赖项(最后一行)

您已经包含了上面的16.0.3版本

答案 1 :(得分:2)

您有两个版本号...显然复制和粘贴失败。

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

可能应该是(上面已经包含了几行):

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

......在此处输入错字之前,请先阅读您的build.gradle

答案 2 :(得分:0)

解决方案:

导航到SDK Manager-> SDK Tools

首先,单击Android SDK Build-Tools并安装最新更新。

第二,单击Android SDK Platform-Tools并安装最新更新。

这应该可以修正红线。

(或者如果不尝试,请尝试以下代码)

写下:

implementation 'com.android.support:support-v4:28.0.0'

或者这个:

implementation 'com.android.support:design:28.0.0'

希望有帮助。

相关问题