“未能通知依赖性解析侦听器."导入FirebaseUI时出错 [英] "Failed to notify dependency resolution listener." Error when importing FirebaseUI
本文介绍了“未能通知依赖性解析侦听器."导入FirebaseUI时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
实施firebaseui时,遇到此错误:
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.
这是我的依赖项:
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'
}
推荐答案
在Android Studio终端中使用./gradlew app:dependencies
将使您知道哪些依赖项具有不同的版本.但是,您可以尝试更新所有相关的依赖项.
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.
在您的根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'
然后尝试重建项目.多数情况下,这应该可以解决该问题,并确保已添加:
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
}
在根build.gradle
中.
这篇关于“未能通知依赖性解析侦听器."导入FirebaseUI时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文