无法解决:com.google.firebaseui:firebase-ui:3.0.0

时间:2017-10-14 09:02:45

标签: android firebase dependencies

无法解决:com.google.firebaseui:firebase-ui:3.0.0。我已经包含了所有必要的依赖项。另外,我已经在firebase中启用了Google Button Login.Still,存在问题。我无法解决firebaseui错误。

  1. 的build.gradle(模块:应用)

        apply plugin: 'com.android.application'
    
        android {
            compileSdkVersion 26
            buildToolsVersion "26.0.1"
            defaultConfig {
                applicationId "com.example.application.moneyapp"
                minSdkVersion 16
                targetSdkVersion 26
                versionCode 1
                versionName "1.0"
                testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            }
            buildTypes {
                release {
                    minifyEnabled false
                    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                }
            }
            productFlavors {
            }
        }
    
        dependencies
                {
                    compile fileTree(include: ['*.jar'], dir: 'libs')
                    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
                        exclude group: 'com.android.support', module: 'support-annotations'
                    })
                    compile 'com.android.support:appcompat-v7:26.0.1'
                    compile 'com.android.support:animated-vector-drawable:26.0.1'
                    compile 'com.android.support:mediarouter-v7:26.0.1'
                    compile 'com.android.support.constraint:constraint-layout:1.0.2'
                    compile 'com.google.android.gms:play-services:11.4.2'
                    compile 'com.google.android.gms:play-services-auth:11.4.2'
                    compile 'com.google.android.gms:play-services-vision:11.4.2'
                    compile 'com.google.firebaseui:firebase-ui:3.0.0'
                    compile 'com.google.firebase:firebase-auth:11.4.2'
                    compile 'com.google.firebase:firebase-core:11.4.2'
                    compile 'com.google.firebase:firebase-crash:11.4.2'
                    compile 'com.google.firebase:firebase-messaging:11.4.2'
                    compile 'com.google.firebase:firebase-database:10.0.1'
                    testCompile 'junit:junit:4.12'
                }
    
        apply plugin: 'com.google.gms.google-services'
    
  2. 的build.gradle(项目:样本)

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.3.3'
            classpath 'com.google.gms:google-services:3.1.1'
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects
            {
        repositories {
            jcenter()
            maven{
                url "https://maven.google.com"
            }
        }
    }
    

    我得到以下错误..我知道这个问题已经在Stack Overflow中,但它无法解决我的问题。 Messages Gradle Sync is showing this error

  3. 在旧的示例答案中,解决方案是在SDK Manager中安装Google Repository和Google Play Service。即使将它们安装到最新版本后,我也会收到相同的错误..请解决我的问题.. 在此先感谢:)

1 个答案:

答案 0 :(得分:0)

没有全包式FirebaseUI包,因此您需要指定所需的单个库。

来自FirebaseUI installation documentation

  

FirebaseUI是作为由其定位的Firebase API分隔的库集合发布的。每个FirebaseUI库都对相应的Firebase SDK具有传递依赖性,因此无需在应用中单独包含这些内容。

     

在app / build.gradle文件中添加对其中一个FirebaseUI库的依赖。

from django.http import HttpResponseRedirect

if not request.user.is_authenticated():
  return HttpResponseRedirect('desired URL')