【问题标题】:Local module descriptor class for com.google.firebase.auth not found未找到 com.google.firebase.auth 的本地模块描述符类
【发布时间】:2016-11-30 20:33:55
【问题描述】:

我尝试使用 firebase 身份验证来创建用户。创建用户时,我收到以下错误堆栈。

> 07-27 07:37:26.385 30248-30261/com.belleza.mewChat W/DynamiteModule:
> Local module descriptor class for com.google.firebase.auth not found.
> 07-27 07:37:26.385 30248-30261/com.belleza.mewChat W/DynamiteModule:
> Local module descriptor class for com.google.firebase.auth not found.
> 07-27 07:37:27.140 30248-30248/com.belleza.mewChat D/Login:
> createUser:onComplete:false 07-27 07:37:27.311
> 30248-30267/com.belleza.mewChat V/RenderScript: 0xb8b54170 Launching
> thread(s), CPUs 8 07-27 07:37:36.501 30248-30261/com.belleza.mewChat
> W/DynamiteModule: Local module descriptor class for
> com.google.firebase.auth not found.

我在 firebase 控制台中为我的项目添加了 SHA 密钥。在 gradle 中也升级到最新版本。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.belleza.mewChat"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.hbb20:ccp:1.5.1'

    //firebase database,ui
    compile 'com.firebaseui:firebase-ui-database:0.4.1'
    compile 'com.google.firebase:firebase-database:9.2.0'

    //firebase auth
    compile 'com.google.android.gms:play-services-auth:9.2.0'
    compile 'com.google.firebase:firebase-auth:9.2.0'
}
apply plugin: 'com.google.gms.google-services'

【问题讨论】:

  • 身份验证失败可能是由与警告消息无关的原因引起的。即使在成功验证后,我也看到了这些消息。您使用的是什么登录方式?您是否在 Firebase 控制台中启用了它?
  • 我正在使用 createUserWithEmailAndPassword 方法,并且我在 firebase 控制台中启用了电子邮件/密码身份验证。也启用了匿名身份验证,但仍然无法创建用户。
  • 你解决了吗?

标签: java android firebase firebase-authentication


【解决方案1】:

如果提供的密码少于 6 个字符,也可能会出现此错误

【讨论】:

    【解决方案2】:

    当我设置时

    ...
    release {
        minifyEnabled true
        ...
    }
    ...
    

    在我的 build.gradle 中,这解决了我的问题。

    【讨论】:

    • 真的吗?你能解释一下吗?我在测试我的应用程序时不时看到这个错误。每次看到它,我都相信我无法再从数据库中检索信息
    【解决方案3】:

    就我而言,该错误是由我的模拟器设备上的 Google Play 服务版本过时引起的。该问题已通过从 Google Play 商店更新 Google Play 服务得到解决。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-11
      • 1970-01-01
      • 2017-04-18
      • 2022-10-23
      • 2018-03-27
      • 2022-07-21
      • 2020-12-11
      相关资源
      最近更新 更多