2017-08-05 167 views
0

我试图添加用户身份验证的能力在我与FirebaseUI Android应用程式,因为我已经添加了这两个依赖于身份验证的gradle我的文件:无法解析的依赖

compile 'com.google.firebase:firebase-auth:11.0.2' 
compile 'com.firebaseui:firebase-ui-auth:2.1.1' 

我得到这个错误:

enter image description here

这是我的gradle这个文件:

apply plugin: 'com.android.application' 

repositories { 
    mavenLocal() 
    flatDir { 
     dirs 'libs' 
    } 
} 

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.0' 

    defaultConfig { 
     applicationId "com.google.firebase.udacity.friendlychat" 
     minSdkVersion 16 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    packagingOptions { 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE-FIREBASE.txt' 
     exclude 'META-INF/NOTICE' 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support:design:25.3.1' 
    // Displaying images 
    compile 'com.github.bumptech.glide:glide:3.6.1' 
    //firebase 
    compile 'com.google.firebase:firebase-auth:11.0.2' 
    compile 'com.firebaseui:firebase-ui-auth:2.1.1' 
    compile 'com.google.firebase:firebase-database:11.0.2' 
} 

apply plugin: 'com.google.gms.google-services' 

这种依赖关系之间是否存在兼容性问题?

+0

你尝试安装版本库写在错误? –

回答

0

FirebaseUI 2.1.1版本对支持库版本25.4.0具有传递依赖性。该FirebaseUI documentation包含此重要配置注:

NOTE : Starting version 25.4.0, support libraries are now available through Google's Maven repository, so ensure that you have that added to your project's repositories.

Open the build.gradle file for your project and modify it as following,

allprojects { 
    repositories { 
     maven { 
      url "https://maven.google.com" 
     } 
     jcenter() 
    } 
} 

对于FirebaseUI一致​​性改变你的依赖使用Suppport图书馆的25.4.0版本:

compile 'com.android.support:appcompat-v7:25.4.0' 
compile 'com.android.support:design:25.4.0' 
相关问题