未能在android studio中找到'com.firebase:firebase-ui:0.2.0'

时间:2015-10-05 08:05:34

标签: android firebase firebase-realtime-database

我想在我的Android应用程序中使用 firebase UI ,但它在`android studio中添加依赖项时不断给出构建错误 我在https://github.com/firebase/FirebaseUI-Android#using-the-library-in-your-android-app尝试了教程 https://www.firebase.com/blog/2015-08-27-firebaseui-makes-mobile-easy.html 但两者都给我同样的错误

这是我的build.gradle文件

apply plugin: 'com.android.application'

android {
  compileSdkVersion 21
  buildToolsVersion '21.1.2'

  defaultConfig {
    applicationId "re.book.bookify"
    minSdkVersion 15
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
  }

  packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE-FIREBASE.txt'
    exclude 'META-INF/NOTICE'
  }

  buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:22.2.0'
  compile 'com.google.android.gms:play-services:7.5.0'
  compile 'com.github.shell-software:fab:1.1.2'
  compile 'com.github.shell-software:viewmover:1.1.0'
  compile 'com.github.shell-software:uitools:1.1.0'
  compile 'com.firebase:firebase-client-android:2.3.1+'
  compile 'com.firebase:firebase-ui:0.2.0'
}

2 个答案:

答案 0 :(得分:5)

请发布 build.gradle 第一

将以下行添加到底部的依赖项对象:

compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.firebaseui:firebase-ui:0.2.0'

检查本说明

https://github.com/firebase/FirebaseUI-Android#using-the-library-in-your-android-app

答案 1 :(得分:0)

感谢Frank van Puffelen,这是确切的问题。 https://www.firebase.com/blog/2015-08-27-firebaseui-makes-mobile-easy.html处给出的gradle链接不正确, 0.2版本的FirebaseUI发布在com.firebaseui组中。因此,它的gradle链接是compile 'com.firebaseui:firebase-ui:0.2.0'