Reputation: 63
I try to build project and get this error:
Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
java.io.IOException: Can't write [C:\Users\Igor\Documents\AndroidStudioProjects\MosaicPicture\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\Igor.gradle\caches\transforms-1\files-1.1\recyclerview-v7-26.1.0.aar\8f92a0a82aeead91e034e3a46e1f2a6c\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/v7/widget/RecyclerView$ItemAnimator.class]))
Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "ru.snoitacilppa.mosaicpicture"
minSdkVersion 19
targetSdkVersion 26
versionCode 8
versionName "1.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:exifinterface:26.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.google.android.gms:play-services-ads:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
compile project(':adcolony-sdk-3.1.2')
}
I tried to clean and rebuild project, but it didn't help me
What's wrong?
Upvotes: 0
Views: 509
Reputation: 355
Updated Solution:
According to this accepted answer and as per the comments, removing recycler-view library from libs resolves the error.
This error mainly occurs when you include libraries in your project and some of those libraries contain common dependencies with the other included libraries of the project and this is why Proguard fails with a Duplicate Zip Entry Exception.
The accepted answers here or here should help you to resolve your error.
Upvotes: 0