When I implement firebaseui, I encounter this error:
Failed to notify dependency resolution listener.
The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[11.0.2,11.0.2], [15.0.1,15.0.1]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
And this is my dependencies:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.firebaseui:firebase-ui:2.1.0'
}
Using ./gradlew app:dependencies
in the Android Studio terminal will let you know which dependencies are having different versions. However, you can try updating all related dependencies.
In your root build.gradle
:
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.1.0'
...
In the app build.gradle
:
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.firebaseui:firebase-ui:2.1.0'
Then try to rebuild the project. This should solve the issue most of the times, also make sure you have added:
repositories {
// ...
google() // Google's Maven repository
}
In the root build.gradle
.