【问题标题】:com.firebase.ui.authui class not found whenever I try to import itcom.firebase.ui.authui 类在我尝试导入时找不到
【发布时间】:2018-02-10 09:01:39
【问题描述】:

我正在使用此代码执行此操作,但库中不存在 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 文件中添加了 Firebase-UI 依赖项?
  • 需要更多细节!!
  • 请编辑您的问题并在其中添加这行代码。
  • @SahdeepSingh 立即查看
  • @AlexMamo 请现在看看 :)

标签: java android firebase firebase-authentication


【解决方案1】:

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

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

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

【讨论】:

猜你喜欢
  • 2014-05-08
  • 2021-11-13
  • 2020-11-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多