Answer the question
In order to leave comments, you need to log in
How to fix "TransformException: duplicate entry org/apache/commons/io/CopyUtils.class" error?
Hey! I encountered such a problem, there are no problems in the code, it seems that there is something in gradle, there is no error in Google with this class (
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "ru.lucky_book"
minSdkVersion 19
targetSdkVersion 25
versionCode 17
versionName "1.4.2"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField 'String', 'ENDPOINT', '"http://luckybook.ru/"'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField 'String', 'ENDPOINT', '"http://luckybook.ru/"'
}
}
dexOptions {
jumboMode = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
disable 'MissingTranslation'
}
}
repositories {
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile 'org.greenrobot:eventbus:3.0.0'
final SUPPORT_LIBRARY_VERSION = '23.1.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:${google_support_version}"
compile "com.android.support:recyclerview-v7:${google_support_version}"
compile "com.android.support:cardview-v7:${google_support_version}"
compile "com.android.support:design:${google_support_version}"
compile "com.android.support:percent:${google_support_version}"
compile('com.google.api-client:google-api-client-android:1.20.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-drive:v2-rev170-1.20.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.github.afollestad.material-dialogs:commons:[email protected]') {
transitive = true
}
compile('com.squareup.retrofit2:converter-simplexml:2.1.0') {
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
exclude group: 'xpp3', module: 'xpp3'
}
// compile 'com.github.ParkSangGwon:TedPicker:v1.0.10'
// compile 'com.github.lovetuzitong:MultiImageSelector:1.1
// compile 'com.github.ShogoMizumoto:ZDepthShadowLayout:1.0.3'
compile group: 'com.itextpdf', name: 'itextpdf', version: '5.5.9'
compile project(':insta-filter')
compile project(':luckybookpreview')
compile project(":rmswitch")
compile project(":materialdatetimepicker")
compile project(':ucrop')
final retrofitVersion = '2.0.0'
final okhttpVersion = '3.7.0'
final rxjavaVersion = '1.0.14'
final rxandroidVersion = '1.0.1'
final butterknifeVersion = '8.4.0'
compile "com.android.support:design:${google_support_version}"
compile('com.crashlytics.sdk.android:crashlytics:[email protected]') {
transitive = true;
}
compile "com.squareup.retrofit2:retrofit:${retrofitVersion}"
compile "com.squareup.okhttp3:okhttp:${okhttpVersion}"
compile "com.squareup.okhttp3:logging-interceptor:${okhttpVersion}"
compile "com.squareup.retrofit2:converter-gson:${retrofitVersion}"
compile "com.squareup.retrofit2:adapter-rxjava:${retrofitVersion}"
compile "io.reactivex:rxjava:${rxjavaVersion}"
compile "io.reactivex:rxandroid:${rxandroidVersion}"
compile 'com.github.zomato:androidphotofilters:1.0.1'
compile 'com.google.android.gms:play-services-drive:8.4.0'
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'org.jetbrains:annotations-java5:15.0'
compile 'com.victor:lib:1.0.4'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.octo.android.robospice:robospice:1.4.14'
compile 'com.dropbox.core:dropbox-core-sdk:3.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.android.support:multidex:1.0.0'
compile 'com.yandex.money.api:yandex-money-sdk-android:3.3.0'
compile 'com.github.pinball83:masked-edittext:1.0.2'
compile 'com.facebook.android:facebook-android-sdk:4.18.0'
compile "com.android.support:support-v4:${google_support_version}"
compile 'com.pnikosis:materialish-progress:1.7'
compile 'com.github.delight-im:Android-AdvancedWebView:v3.0.0'
compile 'com.vk:androidsdk:1.6.5'
compile 'com.yandex.android:mobmetricalib:2.77'
compile "com.jakewharton:butterknife:${butterknifeVersion}"
annotationProcessor "com.jakewharton:butterknife-compiler:${butterknifeVersion}"
compile 'com.github.ronaldsmartin:Material-ViewPagerIndicator:1.0.2'
}
Answer the question
In order to leave comments, you need to log in
Welcome to JAR Hell! Some two dependencies of your program have transitive dependencies using the same class. You just have to find out which ones and add them to the build script
compile('com.example:bad-dependency:1.0') {
exclude group: 'commons-io', name: 'commons-io'
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question