导入语句中的错误无法解析符号FirebaseAuth

时间:2018-08-06 09:41:49

标签: android firebase

Firebase的import语句中突出显示为红色

in the import statement Firebase.. is being highlighted red

执行clean and rebuild project后,该错误尚未解决。在build.gradle中添加了依赖项,但仍然没有任何反应 请帮忙。

apply plugin: 'com.android.application'
android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "com.example.admin.myapp"
        minSdkVersion 16
        targetSdkVersion 27
        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(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:palette-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:customtabs:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    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.1'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation 'com.firebaseui:firebase-ui:2.0.1'
    implementation 'com.firebaseui:firebase-ui-auth:2.0.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.google.firebase:firebase-auth:16.0.2'
    implementation 'com.firebaseui:firebase-ui:2.0.1'



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

这是我的build.gradle文件。

1 个答案:

答案 0 :(得分:0)

将此添加到您的build.gradle

implementation com.google.firebase:firebase-auth:16.0.2