我的所有依赖:
implementation fileTree(dir: 'libs',include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-firestore:11.8.0'
implementation 'com.firebaseui:firebase-ui-firestore:3.2.1'
implementation 'com.google.firebase:firebase-crash:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation ('com.facebook.android:facebook-android-sdk:4.31.0'){exclude group: 'com.android.support'}
implementation'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
compile 'com.android.support:cardview-v7:27.1.0'
compile 'com.android.support:recyclerview-v7:27.1.0'
compile 'com.airbnb.android:lottie:2.3.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
compile 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:design:27.1.0'
compile 'com.android.support:multidex:1.0.3'
一切都很好,但更新到27.1.0后
错误:任务’:app:transformClassesWithJarMergingForRelease’的执行失败.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/arch/lifecycle/LiveData$1.class
最佳答案
这可能是由于依赖项的版本不匹配而发生的.
我检查了它的依赖树:
原文链接:https://www.f2er.com/android/430198.html我检查了它的依赖树:
android.arch.lifecycle:extensions:1.0.0
和
android.arch.lifecycle:livedata-core:1.1.0
看到不匹配1.0.0& 1.1.0
在您的情况下尝试更新:
implementation 'com.firebaseui:firebase-ui-firestore:3.2.1'
至:
implementation 'com.firebaseui:firebase-ui-firestore:3.2.2'
应该有希望修复版本问题.
并注意,对于所有依赖项,不推荐使用compile实现.
Update:
您始终可以通过Windows中的命令gradlew your_app_name:dependencies检查依赖关系树