在添加实现'com.google.firebase:firebase-auth:19.2.0'时,出现了这些错误。
Duplicate class com.google.firebase.auth.AuthCredential found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.EmailAuthCredential found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.EmailAuthProvider found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.FacebookAuthCredential found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.FacebookAuthProvider found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.FirebaseAuthProvider found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.GithubAuthCredential found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.GithubAuthProvider found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.GoogleAuthCredential found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.GoogleAuthProvider found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.TwitterAuthCredential found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.TwitterAuthProvider found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.UserInfo found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.UserProfileChangeRequest found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.UserProfileChangeRequest$Builder found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
Duplicate class com.google.firebase.auth.zza found in modules firebase-auth-19.2.0-runtime.jar (com.google.firebase:firebase-auth:19.2.0) and jetified-firebase-auth-common-9.6.1-runtime.jar (com.google.firebase:firebase-auth-common:9.6.1)
转到文档以了解如何解决依赖关系解析错误。
答案 0 :(得分:-1)
检查是否添加了包括firebase的任何其他依赖项,如果是,则排除。
答案 1 :(得分:-1)
尝试更改以下内容
只需用您的firebase auth和auth UI依赖项替换波纹管拖线
implementation('com.firebaseui:firebase-ui-auth:x.x.x') {
exclude group: 'com.google.firebase', module: 'firebase-auth'
}
implementation 'com.google.firebase:firebase-auth:19.2.0'