gpt4 book ai didi

java - 构建失败并显示 'Program type already present: android.arch.core.util.Function' - Firebase 依赖项问题

转载 作者:行者123 更新时间:2023-12-02 10:35:58 24 4
gpt4 key购买 nike

我的项目中有各种 Firebase 库,似乎存在某种冲突导致构建失败。下面是我的 build.gradle:

  dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

// Support library
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'

// Firebase
implementation 'com.google.firebase:firebase-storage:16.0.4'
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-appindexing:16.0.2'
implementation 'com.google.firebase:firebase-firestore:17.1.3'
implementation 'com.firebaseui:firebase-ui-firestore:4.2.1'

// Third party
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.facebook.android:facebook-android-sdk:4.38.1'
implementation 'jp.wasabeef:recyclerview-animators:2.2.3'
implementation 'com.github.clans:fab:1.6.2'
implementation 'de.hdodenhof:circleimageview:2.0.0'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.github.PhilJay:MPAndroidChart:v2.2.2'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.android.support:multidex:1.0.3'
//
// implementation "android.arch.core:runtime:1.1.1"
// implementation "android.arch.core:common:1.1.1"


}

当我添加以下内容时,我能够成功构建:

implementation "android.arch.core:runtime:1.1.1"
implementation "android.arch.core:common:1.1.1"

我发布了类似的问题here ,我也在那里发布了我的日志以供引用。我担心的是,添加上面的 2 个依赖项只是一个临时解决方案,因为我不想发布带有这些依赖项的应用程序。任何帮助表示赞赏!

最佳答案

要解决此问题,请更改以下代码行:

implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.firebaseui:firebase-ui-database:4.2.0'
implementation "com.google.firebase:firebase-firestore:17.1.2"
implementation 'com.firebaseui:firebase-ui-firestore:4.0.1'

implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.firebaseui:firebase-ui-database:4.2.1'
implementation 'com.google.firebase:firebase-firestore:17.1.3'
implementation 'com.firebaseui:firebase-ui-firestore:4.2.1'

另请确保使用 ' 而不是 "

关于java - 构建失败并显示 'Program type already present: android.arch.core.util.Function' - Firebase 依赖项问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53292439/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com