Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 每当我尝试导入com.firebase.ui.authui类时,都找不到它_Java_Android_Firebase_Firebase Authentication - Fatal编程技术网

Java 每当我尝试导入com.firebase.ui.authui类时,都找不到它

Java 每当我尝试导入com.firebase.ui.authui类时,都找不到它,java,android,firebase,firebase-authentication,Java,Android,Firebase,Firebase Authentication,我正在使用此代码执行此操作,但库中不存在com.firebase.ui.authui。我在哪里可以得到它,或者如何在代码中使用它。请帮忙 startActivityForResult( AuthUI.getInstance() .createSignInIntentBuilder() .setIsS

我正在使用此代码执行此操作,但库中不存在com.firebase.ui.authui。我在哪里可以得到它,或者如何在代码中使用它。请帮忙

startActivityForResult(
                            AuthUI.getInstance()
                                    .createSignInIntentBuilder()
                                    .setIsSmartLockEnabled(false)
                                    .setProviders(
                                            AuthUI.EMAIL_PROVIDER,
                                            AuthUI.GOOGLE_PROVIDER)
                                    .build(),
                            RC_SIGN_IN);
这是我的build.gradle文件:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    //noinspection GradleCompatible
    compile 'com.android.support:design:24.2.1'
    compile 'com.android.support:appcompat-v7:26.0.0'
    // Displaying images
    compile 'com.github.bumptech.glide:glide:3.6.1'
    compile 'com.google.firebase:firebase-database:11.8.0'
    compile 'com.google.firebase:firebase-auth:11.8.0'
    compile 'com.firebaseui:firebase-ui-database:3.2.1'
}

要解决此问题,请在
build.gradle
文件中添加以下行:

compile 'com.firebaseui:firebase-ui-auth:3.2.1'

将Firebase身份验证与库一起使用时,必须将这两个依赖项都添加到build.gradle文件中。

是否在build.gradle文件中添加了Firebase UI依赖项?需要更多详细信息!!请编辑您的问题并在其中添加这行代码。@sahdepsingh Checknow@AlexMamo现在请看一看:)谢谢您的帮助,但当我添加此错误时:无法打开zip文件。Gradle的依赖项缓存可能已损坏(有时会在网络连接超时后发生)。出现此错误时,单击“发生了什么?”时,它不会执行任何操作?我理解。清理项目并重试。