【问题标题】:Failed to resolve: com.firebase:fire-client-android:2.4.2无法解决:com.firebase:fire-client-android:2.4.2
【发布时间】:2016-06-03 08:04:45
【问题描述】:

我正在使用 Firebase。 这是 app/build.gradle 上的错误:

Error:(26, 13) Failed to resolve: com.firebase:fire-client-android:2.4.0

Error:(29, 13) Failed to resolve: com.firebaseui:firebase-ui:1.3.1

我哪里错了?

这是我的模块 build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.prueba.android.connect4"
    minSdkVersion 10
    targetSdkVersion 22
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE-FIREBASE.txt'
    exclude 'META-INF/NOTICE'
}
}
dependencies {
    compile files('libs/connect4Lib.jar')
    compile 'com.firebase:fire-client-android:2.4.2'
    compile 'com.android.support:appcompat-v7:23.0.2'
    compile 'com.android.support:design:23.1.1'
    compile 'com.firebaseui:firebase-ui:1.3.1'
}

还有顶级gradle:

buildscript {
repositories {

    jcenter() {
        url "http://jcenter.bintray.com/"
    }

}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.0'
}
}
allprojects {
    repositories {
        jcenter(){
            url "http://jcenter.bintray.com/"
        }
    }
}

错误:

提前致谢

【问题讨论】:

  • 对于2.4.0版本的Firebase,依赖是com.firebase:firebase-client-android:2.4.0。您缺少 base 部分

标签: android gradle firebase dependencies build.gradle


【解决方案1】:

我建议您迁移到 google firebase,因为旧的 firebase API 已被弃用,并且将来会被删除。 更改您的 gradle 以包含

compile 'com.google.firebase:firebase-core:9.0.1'
compile 'com.google.firebase:firebase-database:9.0.1' //For realtime database

结帐this 了解更多信息。

【讨论】:

  • 目前 Firebase 建议 Android 用户在使用身份验证时继续使用旧版,因为此问题中显示的身份验证存在问题:status.firebase.google.com/incident/Authentication/16001
  • 但从问题看来@Pablo 似乎是重新开始。所以他不应该使用旧的 API。这个问题迟早会得到解决。
  • 只是帮助他获取所有信息,以便他可以做出明智的决定......不要假设任何事情,但如果有人只是为了教育目的而开始,那么他/她会处于更好的位置。使用新的火力基地
  • AFAIK 该问题与其他提供商的身份验证有关,与电子邮件/密码身份验证无关。我有一个与谷歌身份验证和电子邮件/密码身份验证完美配合的应用程序。
  • 抱歉,这项工作是由其他人完成的。改不了,不知道怎么改使用此代码没有解决方案?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-01-15
  • 1970-01-01
  • 2019-11-14
  • 1970-01-01
  • 2015-10-03
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多