I am receiving this error in Android Studio:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
With this app gradle file:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 26
buildToolsVersion "26.0.3"
defaultConfig {
applicationId "com.example.android.kotlintest"
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation "com.android.support:design:$supportVersion"
implementation "com.android.support:support-v13:$supportVersion"
testCompile 'junit:junit:4.12'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
}
repositories {
mavenCentral()
}
Also, the $supportVersion
is = '26.+'
I cannot figure out what configuration is causing this. I have tried clean & rebuild, and I added multiDexEnabled true
and nothing has worked.
Any help would be greatly appreciated!