I unable to build the gradle
and getting error.I'm using android studio 3.0 stable version
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Detail:
Information:Gradle tasks [clean, :app:assembleDebug]
Error:Execution failed for task
':app:transformClassesWithMultidexlistForDebug'.
> java.io.IOException: Can't write [D:\Studio Projects\SampleMVP
\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [D:\Studio Projects\SampleMVP\app\build\intermediates\transforms\desugar\debug\13.jar(;;;;;;**.class)] (Duplicate zip entry [13.jar:android/support/v4/view/ViewPager$1.class]))
Information:BUILD FAILED in 4m 6s
Information:1 error
Information:0 warnings
Information:See complete output in console
My app gradle
:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.0"
defaultConfig {
applicationId "ocs.com.samplemvp"
minSdkVersion 15
targetSdkVersion 27
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'
}
}
dataBinding {
enabled = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
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'
}
I tried to many time clean and rebuild but not working