I am getting the error:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForPaidFreeDebug'. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
After adding the following two dependencies:
implementation 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
implementation 'com.prolificinteractive:material-calendarview:1.4.3'
Here are all of my dependencies:
dependencies {
compile 'com.android.support:multidex:1.0.2'
compile('com.github.florent37:materialviewpager:1.2.0@aar') {
transitive = true
}
compile 'com.android.support:multidex:1.0.0'
compile files('libs/droidText.0.2.jar')
compile 'commons-io:commons-io:2.5'
compile 'com.google.code.findbugs:jsr305:3.0.0'
// in app billing
compile 'com.anjlab.android.iab.v3:library:1.0.44'
compile 'org.solovyev.android:checkout:1.2.1'
//
compile 'com.github.simbiose:Encryption:2.0.1'
compile 'com.android.support:support-v13:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'me.everything:providers-android:1.0.1'
//dateTime Picker
implementation 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
implementation 'com.prolificinteractive:material-calendarview:1.4.3'
//Date Time
compile 'net.danlew:android.joda:2.9.9'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
compile 'com.github.danysantiago:sendgrid-android:1'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.google.firebase:firebase-ads:10.0.1'
//Logging
compile 'com.jakewharton.timber:timber:4.5.1'
//Retrofit
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
compile 'com.squareup.retrofit2:converter-scalars:2.3.0'
//Rx
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.0.8'
//butterknife
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
testCompile 'junit:junit:4.12'
testCompile 'org.apache.maven:maven-ant-tasks:2.1.3'
testCompile 'org.robolectric:robolectric:3.1-rc1'
testCompile 'org.robolectric:shadows-support-v4:3.1-rc1'
testCompile 'org.glassfish:javax.annotation:10.0-b28'
testCompile 'org.mockito:mockito-core:2.0.7-beta'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'org.robolectric:shadows-multidex:3.1-rc1'
testCompile 'org.assertj:assertj-core:1.7.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}
My default config:
defaultConfig {
applicationId "com.webnation.text2email"
minSdkVersion 19
targetSdkVersion 19
multiDexEnabled true
}
I have upgraded the memory, added multiDexEnabled, added the support library for multi-dex.
Interesting, I had to add
exclude 'META-INF/DEPENDENCIES'
in order to get it to the multidex error.
I can't seem to find a solution.
Detailed error:
Error:07:48:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 07:48:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 07:48:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 07:48:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 07:48:24.286 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:transformClassesWithMultidexlistForPaidFreeDebug'. 07:48:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > java.io.IOException: Can't write [/Users/kristywelsh/Dropbox/SMS2Email1/app/build/intermediates/multi-dex/paidFree/debug/componentClasses.jar] (Can't read [/Users/kristywelsh/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.3.2/31fbbff1ddbf98f3aa7377c94d33b0447c646b6e/httpcore-4.3.2.jar(;;;;;;**.class)] (Duplicate zip entry [httpcore-4.3.2.jar:org/apache/http/annotation/NotThreadSafe.class])) 07:48:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 07:48:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try: 07:48:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 07:48:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 07:48:24.287 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org 07:48:24.287 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 07:48:24.287 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 34s