无法解决Firebase依赖项

时间:2018-12-15 12:40:43

标签: android firebase android-studio firebase-authentication

我的build.gradle文件如下:

apply plugin: 'com.android.application'

android {

    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.my.prohead"
        minSdkVersion 24
        targetSdkVersion 26
        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:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    //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-core:16.0.6'

    //implementation 'com.google.firebase:firebase-auth:11.0.4'
    // implementation 'com.google.firebase:firebase-database:16.0.5'

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


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

}

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

但是,尽管已经设置了依赖项,但是它没有被编译 如果我尝试更改实现,它说未设置依赖项!
任何帮助将不胜感激!

2 个答案:

答案 0 :(得分:2)

从应用程序级别build.gradle文件中删除此文件:

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

并仅添加

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

答案 1 :(得分:1)

应为:

get_form_kwargs

在项目级别的构建gradle文件中:

__init__