Android 任务';的执行失败:app:TransformClasses与Debug的多索引列表';重复的邮政编码条目

Android 任务';的执行失败:app:TransformClasses与Debug的多索引列表';重复的邮政编码条目,android,android-gradle-plugin,build.gradle,android-multidex,Android,Android Gradle Plugin,Build.gradle,Android Multidex,我突然得到下面的错误。应用程序一直运行到早上。从那时起,我一直在得到这个。我尝试从Git加载旧的提交,但是现在我遇到了同样的问题。我可以看到某个类有一个重复条目,但不清楚在哪里。我已经检查了我所有的图书馆,以找到这个问题,但徒劳。请帮忙 Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. > java.io.IOException: Can't write [C:\Users\B

我突然得到下面的错误。应用程序一直运行到早上。从那时起,我一直在得到这个。我尝试从Git加载旧的提交,但是现在我遇到了同样的问题。我可以看到某个类有一个重复条目,但不清楚在哪里。我已经检查了我所有的图书馆,以找到这个问题,但徒劳。请帮忙

Error:Execution failed for task 
':app:transformClassesWithMultidexlistForDebug'.
> java.io.IOException: Can't write [C:\Users\Bluetie Backup 3 
i5\Downloads\Bluetie_Android_NewDesign-
Development\Bluetie_Android_NewDesign-Development\BlueTieAndroid-
master\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't 
read [C:\Users\Bluetie Backup 3 i5\.gradle\caches\transforms-1\files-
1.1\support-core-ui-27.1.0.aar\781c80d72f0634c3cfc30b7ab8014102\jars\classes.jar(;;;;;;**.class)] 
(Duplicate zip entry[classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))`
我使用了很多库,因为我的应用程序非常以用户界面为中心

这是
build.gradle
文件

compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
{
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':rtp')
compile project(':pageIndicator')
compile files('libs/linkedin-j-android.jar')
//compile files('libs/commons-codec-1.3.jar')
//compile files('libs/signpost-core-1.2.1.1.jar')
compile project(':imagepicker')
compile project(':swipflingview')

compile project(':linkedin-sdk')
compile 'com.android.support:multidex:1.0.2'
//noinspection GradleCompatible
compile 'com.google.firebase:firebase-core:11.0.2'
compile 'com.google.firebase:firebase-crash:11.0.2'
/* compile 'com.google.firebase:firebase-auth:11.0.2'*/
compile 'com.google.android.gms:play-services-analytics:11.0.2'
compile 'com.google.firebase:firebase-messaging:11.0.2'
compile 'com.google.android.gms:play-services-location:11.0.2'
/*compile 'com.google.android.gms:play-services-ads:11.0.2'*/
compile 'com.google.android.gms:play-services-auth:11.0.2'
/*  compile 'com.google.android.gms:play-services-gcm:11.0.2'*/
compile 'com.google.android.gms:play-services-places:11.0.2'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.squareup.okio:okio:1.0.1'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:design:26.1.0'
compile ('com.facebook.android:facebook-android-sdk:4.6.0'){
    exclude module: 'support-v4'
}
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.yalantis:ucrop:2.2.0'
compile 'com.appyvet:materialrangebar:1.3'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.makeramen:roundedimageview:2.3.0'
compile 'com.jsibbold:zoomage:1.1.0'
compile 'com.michaelmuenzer.android:ScrollableNumberPicker:0.2.2'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
compile ('com.nineoldandroids:library:2.4.0'){
    exclude module: 'support-v4'
}
compile 'uk.co.samuelwall:material-tap-target-prompt:1.1.4'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.android.support:percent:26.1.0'
compile('com.github.ozodrukh:CircularReveal:1.1.1') {
    transitive = true;
}
testCompile 'junit:junit:4.12'
compile project(':paralaxed_viewpager')
compile project(':tooltiplibrary'){
    exclude module: 'support-v4'
}
compile project(':pinview_lib')
compile 'com.github.travijuu:numberpicker:1.0.7'
compile 'com.razorpay:checkout:1.4.1'

compile 'com.github.travijuu:numberpicker:1.0.7'
compile 'com.razorpay:checkout:1.4.1'
compile project(':country_code_picker_library')
compile 'com.github.satyan:sugar:1.5'
compile 'org.igniterealtime.smack:smack-android:4.1.6'
compile 'org.igniterealtime.smack:smack-tcp:4.1.6'
compile 'org.igniterealtime.smack:smack-im:4.1.6'
compile 'org.igniterealtime.smack:smack-extensions:4.1.6'
compile 'com.jackandphantom.android:circularprogressbar:1.2.0'
compile 'com.jaredrummler:material-spinner:1.2.4'
compile 'com.skyfishjy.ripplebackground:library:1.0.1'

compile 'com.wonderkiln:camerakit:0.13.1'
compile 'com.droidninja:filepicker:2.1.2'
compile project(':autocompleteview')
compile 'com.appsflyer:af-android-sdk:4.8.7@aar'
compile 'com.android.installreferrer:installreferrer:1.0'

只需更改依赖项的版本-

同步>>清理>>重建,并完成


在我的情况下,这一变化解决了我的问题

此错误出现在Android发布后(2018年2月)

我认为,这个错误是因为项目中使用了一些依赖项

compile 'com.another.library:1.2.3'
compile '.....'
因为每个依赖项都是另一个项目,有自己的依赖项。Android试图在构建时将所有这些添加到项目中。如果依赖项使用支持库的其他版本,则可能会发生此类冲突或重复

可能您的某个依赖项的gradle文件中有一行声明:

 compile 'com.android.support:design:27.+'
这意味着“使用最新版本的v.27”

当v.27.1.0发布后,您自己的
编译'com.android.support:…:26.1.0'
行导致重复

要解决此问题: 您可以将自己的依赖项更新到新版本

-如果您能够找到-您可以使用v.27.1.0从依赖项中排除支持库:

compile('com.another.library:1.2.3') {
    exclude group: 'com.android.support', module: 'support-v13'
}

更改依赖项版本

用这个

implementation 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
而不是

implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.+'

看起来您的构建中包含了多个版本的CoordinatorLayout。这将有助于提供您的构建文件。如何找出重复条目?您好,请在此处发布您的
build.gradle
文件。谢谢我从昨天起就有同样的问题。虽然我在过去的三天里没有做任何改变。它以前工作得很好。必须是新更新的问题。请尝试评论所有
com.google.android.gms:play services-…
并使用
编译'com.google.android.gms:play services:11.8.0'
然后清除项目重建,然后尝试运行。。。这对梅兰克斯很有效。但究竟发生了什么,而且太突然了?
implementation 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.+'