"Не удалось уведомить слушателя разрешения зависимостей."Ошибка при импорте FirebaseUI - PullRequest
0 голосов
/ 21 октября 2018

Когда я внедряю firebaseui, я сталкиваюсь с этой ошибкой:

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.

И это мои зависимости:

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'
}

1 Ответ

0 голосов
/ 21 октября 2018

Использование ./gradlew app:dependencies в терминале Android Studio позволит вам узнать, какие зависимости имеют разные версии.Тем не менее, вы можете попробовать обновить все связанные зависимости.

В вашем корне build.gradle:

dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    classpath 'com.google.gms:google-services:4.1.0'
    ...

В приложении build.gradle:

implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.firebaseui:firebase-ui:2.1.0'

Затем попробуйте пересобрать проект.Это должно решить проблему в большинстве случаев, также убедитесь, что вы добавили:

 repositories {
        // ...
        google() // Google's Maven repository
    }

В корне build.gradle.

...