【发布时间】:2019-04-16 23:04:07
【问题描述】:
我的项目中有各种 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 个依赖项只是一个临时解决方案,因为我不想发布带有这些依赖项的应用程序。任何帮助表示赞赏!
【问题讨论】:
-
我看到了一些过时的依赖,比如 Gson。你应该更新它们。您也不应该对依赖项 (Facebook) 使用
x.+版本方案。它可能会导致这样的错误。 -
谢谢,我实际上根据编辑器警告更新了所有依赖项,但我仍然遇到问题。
-
请添加更新后的文件并回复@。
-
谢谢@AlexMamo 我已经更新了gradle
-
不需要它们。当您尝试在没有它们的情况下编译您的应用程序时会发生什么?
标签: java android firebase gradle firebaseui