DexArchiveMergerException: Unable to merge dex - Android Studio 3.0 Stable

error:com.android.builder.dexing.dexarchivemergerexception: unable to merge dex
android studio 3.0 unable to merge dex
error dex merging failed
error while merging dex archives unity
unable to merge dex android error
error while merging dex archives ionic
error while merging dex archives react-native
execution failed for task ':app:transformdexarchivewithexternallibsdexmergerfordebug

I made:

  • In "Settings"->"Android SDK"->"SDK Tools" Google Play services is checked and installed v.46
  • Removed folder /.gradle
  • "Clean Project"
  • "Rebuild Project"

Error is:

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Here is output of command gradlew -q app:dependencies>>app_dependencies.txt

After run of the command gradle :app:assembleDebug --stacktrace I get this:

> Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

 After run of the command
`gradle :app:assembleDebug --stacktrace` 
Error is:

:app:javaPreCompileDebug UP-TO-DATE
:app:compileDebugJavaWithJavacAn exception has occurred in the compiler (1.8.0_152-release). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.IllegalStateException: endPosTable already set
    at com.sun.tools.javac.util.DiagnosticSource.setEndPosTable(DiagnosticSource.java:136)
    at com.sun.tools.javac.util.Log.setEndPosTable(Log.java:350)
    at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:667)
    at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:950)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.<init>(JavacProcessingEnvironment.java:892)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.next(JavacProcessingEnvironment.java:921)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1187)
    at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
    at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
    at com.sun.tools.javac.main.Main.compile(Main.java:523)
    at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
    at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
    at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:49)
    at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)
    at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
    at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
    at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:39)
    at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:24)
    at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:198)
    at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:129)
    at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:95)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:745)
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details.
    at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:51)
    at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:99)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:52)
    at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:37)
    at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
    at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
    at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:39)
    at org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilationFinalizer.execute(IncrementalCompilationFinalizer.java:24)
    at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:198)
    at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:129)
    at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:95)
    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
    at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
    ... 27 more


* Get more help at https://help.gradle.org

BUILD FAILED in 19s
259 actionable tasks: 6 executed, 253 up-to-date
10:58:01: External task execution finished 'assembleDebug --stacktrace'.

My project gradle file:

apply from: 'dependencies.gradle'
buildscript {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url 'https://maven.fabric.io/public' }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0'
        classpath 'com.google.gms:google-services:3.1.0'
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        maven { url "https://jitpack.io" }
        maven { url 'https://maven.fabric.io/public' }
        google()
    }

    ext {
        androidApplicationId = 'com.example'
        androidVersionCode = 1
        androidVersionName = "1.1.0"
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

File :app/ build.gradle:

    apply plugin: 'com.android.application'
    apply plugin: 'io.fabric'


    android {
        compileSdkVersion 25
        buildToolsVersion "26.0.2"

        defaultConfig {
            multiDexEnabled true
            applicationId "com.example"
            minSdkVersion 21
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"

            renderscriptTargetApi 23
            renderscriptSupportModeEnabled true

        }
        compileOptions {
            targetCompatibility 1.8
            sourceCompatibility 1.8
        }
        lintOptions {
            quiet true
            abortOnError false
            ignoreWarnings true
            disable 'InvalidPackage'           //Some libraries have issues with this.
            disable 'OldTargetApi'
            //Lint gives this warning but SDK 20 would be Android L Beta.
            disable 'IconDensities'            //For testing purpose. This is safe to remove.
            disable 'IconMissingDensityFolder' //For testing purpose. This is safe to remove.
        }


        dexOptions {
            javaMaxHeapSize "8G"
        }

        packagingOptions {
            exclude 'LICENSE.txt'
            exclude 'META-INF/DEPENDENCIES.txt'
            exclude 'META-INF/LICENSE.txt'
            exclude 'META-INF/NOTICE.txt'
            exclude 'META-INF/NOTICE'
            exclude 'META-INF/LICENSE'
            exclude 'META-INF/DEPENDENCIES'
            exclude 'META-INF/notice.txt'
            exclude 'META-INF/license.txt'
            exclude 'META-INF/dependencies.txt'
            exclude 'META-INF/rxjava.properties'
        }

        sourceSets {
            main.java.srcDirs += 'build/generated/source/apt'
        }
    }

    repositories {
        flatDir {
            dirs 'libs'
        }
    }



    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation project(':library_api')
    implementation project(':library_base')
    implementation project(':library_blur_dialog')
    implementation project(':library_countrycodepicker_dialog')
    implementation project(':library_glow_decorator')
    implementation project(':library_icons')
    implementation project(':library_loopvideo')
    implementation project(':library_section_adaper')
    implementation project(':library_taptargetview')
    implementation project(':library_ucrop')
    implementation project(':library_utils')
    implementation project(':library_utils_picasso')
    implementation project(':library_vector_compat')
    implementation project(':library_view_clock')
    implementation project(':library_view_shimmer_recycler')

    implementation "com.google.android.gms:play-services-cast-framework:11.4.2"
    compileOnly 'com.google.android.wearable:wearable:2.0.3'
    implementation 'com.google.android.support:wearable:2.0.3'
    implementation 'com.google.android.exoplayer:exoplayer:r2.4.1'

    implementation "com.android.support:mediarouter-v7:25.4.0"
    implementation "com.android.support:leanback-v17:25.4.0"
    implementation "com.android.support:design:25.4.0"

    implementation "com.android.support:appcompat-v7:25.4.0"
    implementation "com.android.support:support-v4:25.4.0"
    implementation "com.android.support:gridlayout-v7:25.4.0"
    implementation "com.android.support:cardview-v7:25.4.0"
    implementation "com.android.support:recyclerview-v7:25.4.0"
    implementation "com.android.support:preference-v14:25.4.0"

    // rxjava
    implementation  'io.reactivex:rxjava:1.2.9'
    implementation 'io.reactivex:rxandroid:1.2.1'
    implementation 'com.github.davidmoten:rxjava-extras:0.8.0.6'

    // square
     "com.squareup.retrofit2:retrofit:2.1.0",
    implementation  "com.squareup.retrofit2:converter-gson:2.1.0"
    implementation "com.squareup.retrofit2:adapter-rxjava:2.1.0"
    implementation "com.squareup.phrase:phrase:1.1.0"

    implementation "com.squareup.okhttp3:okhttp:3.6.0"
    implementation "com.squareup.okhttp3:logging-interceptor:3.6.0"
    implementation "com.squareup.okhttp3:okhttp-urlconnection:3.6.0"

    // picasso
    implementation  "com.squareup.picasso:picasso:2.5.2"
    implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'

    // dagger
    implementation "com.google.dagger:dagger:2.10"
    annotationProcessor  "com.google.dagger:dagger-compiler:2.10"
    implementation "javax.annotation:jsr250-api:1.0"
    implementation  "javax.inject:javax.inject:1"


    // jake ftw
    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

    compileOnly 'org.projectlombok:lombok:1.16.16'
    annotationProcessor 'org.projectlombok:lombok:1.16.16'

    // FragmentWithArgs
    implementation   "com.hannesdorfmann.fragmentargs:annotation:3.0.2",
    annotationProcessor "com.hannesdorfmann.fragmentargs:processor:3.0.2",

    implementation "org.parceler:parceler-api:1.1.9",
    annotationProcessor "org.parceler:parceler:1.1.9",
    implementation 'com.hannesdorfmann.fragmentargs:bundler-parceler:3.0.2'

    implementation "com.github.codekidX:storage-chooser:1.0.34"

    implementation 'io.github.yavski:fab-speed-dial:1.0.6'

    implementation('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
        transitive = true;
    }

    // intent builder
    implementation         "com.github.marcinmoskala.activitystarter:activitystarter:1.00"
annotationProcessor  "com.github.marcinmoskala.activitystarter:activitystarter-compiler:1.00"

    implementation 'com.android.support.constraint:constraint-layout:1.0.2'//constraint-layout
    implementation 'org.greenrobot:eventbus:3.0.0'
    //font
    implementation 'uk.co.chrisjenx:calligraphy:2.2.0'
    implementation 'com.github.florent37:expectanim:1.0.6'
    implementation 'com.romandanylyk:pageindicatorview:0.2.0@aar'
    implementation 'com.github.rubensousa:gravitysnaphelper:1.2'
    implementation 'com.flaviofaria:kenburnsview:1.0.7'
    implementation 'com.github.florent37:arclayout:1.0.2'

    implementation 'com.jakewharton.rxbinding:rxbinding:1.0.1'
    implementation 'com.wang.avi:library:2.1.3'
    implementation 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
    implementation 'com.borax12.materialdaterangepicker:library:1.9'
    implementation 'com.github.scottyab:showhidepasswordedittext:0.8'
    //Location
    implementation "com.google.android.gms:play-services-maps:11.4.2"
    implementation 'pl.charmas.android:android-reactive-location:0.10@aar'
    implementation "com.google.android.gms:play-services-location:11.4.2"
    //you can use newer GMS version if you need
    implementation "com.google.android.gms:play-services-places:11.4.2"
    implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
    implementation 'commons-validator:commons-validator:1.4.1'
    implementation 'com.balysv:material-ripple:1.0.2'
    implementation 'com.googlecode.libphonenumber:libphonenumber:8.5.2'
    implementation 'ru.egslava:MaskedEditText:1.0.5'
    implementation 'com.futuremind.recyclerfastscroll:fastscroll:0.2.5'

    implementation "com.google.firebase:firebase-core:11.4.2"


    implementation 'com.labo.kaji:swipeawaydialog:0.1.1'
    implementation 'io.supercharge:shimmerlayout:1.0.1'
    implementation 'hanks.xyz:htextview-library:0.1.5'
    implementation 'com.github.castorflex.smoothprogressbar:library:1.1.0'//progressbar for action bar
    implementation 'io.reactivex:rxjava-math:1.0.0'
    implementation 'jp.wasabeef:picasso-transformations:2.1.2'
    implementation 'com.afollestad.material-dialogs:core:0.9.1.0'
    implementation('com.github.ihsanbal:LoggingInterceptor:2.0.2') {
        exclude group: 'org.json', module: 'json'
    }

}
apply plugin: 'com.google.gms.google-services'

Application class:

public class TheApplication  extends Application {
...
}

Add

implementation('commons-validator:commons-validator:1.4.1') {
        exclude group: 'commons-collections', module: 'commons-collections'
    }

instead of

implementation'commons-validator:commons-validator:1.4.1'

The reason I've tried to explain here if you want to understand the issue and solution.

Hope it solves your issue.

Unable to Merge Dex - Android Studio 3.0, Add an explicit dependency to play-services-auth along with your firebase-ui- auth dependency: // FirebaseUI for Firebase Auth compile� DexArchiveMergerException: Unable to merge dex - Android Studio 3.0 Stable. Ask Question com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

I was getting the very same issue as there was a local jar for gson in the lib module of my project. As per this link, Library modules no longer process local JARs.

I removed the gson-*.jar and added compile 'com.google.code.gson:gson:2.8.2' to build.gradle instead to solve this problem.

Unable to merge dex - Android Studio 3.0 stable, android studio 3.0 unable to merge dex com.android.builder.dexing. dexarchivemergerexception: error while merging dex archives: error while merging dex� Я столкнулся с одной и той же проблемой в Android Studio 3.0.1, я пробовал все возможные случаи, когда ничего не работало для меня, как упоминалось выше, наконец, я решил это . Solution1: Закрыть Android Studio

Add android.support.design dependency It worked for me

невозможно merge dex-Android Studio 3.0 stable, DexArchiveMergerException: невозможно merge dex-Android Studio 3.0 stable. Я сделал это: DexArchiveMergerException: Unable to merge dex. Al actualizar a Android Studio 3.0 y actualización de la gradle herramienta de construcción de la versión 3.0.0, la compilación de las dependencias se realiza ahora de forma diferente que en versiones anteriores. Recientemente he encontrado con el mismo problema.

Basically you have to understand the stuff of MultiDex here>https://developer.android.com/studio/build/multidex

I used the above instructions and made my app working again :)

Android Studio 3.0 Execution failed for task: unable to merge dex, RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex in Android Studio 3.0 [closed] Ask Question Asked 2 years, � flutter doctor -v [√] Flutter (Channel dev, v0.1.5, on Microsoft Windows [Version 10.0.16299.248], locale en-IN) • Flutter version 0.1.5 at F:\03. System Paths\flutter • Framework revision 3ea4d06340 (3 days ago), 2018-02-22 11:12:39 -08

My problem is not the same as yours,but I think it maybe work for you too. You should change the value of compileSdkVersion from 25 to 26,then sync.See if it works.

com.android.builder.dexing.DexArchiveMergerException: Unable to , com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex - Android Studio 3.0 stable. 06-29 06:44. I made: In "Settings"->"Android�

Unable to Merge Dex - Android Studio 3.0, When I updated my Android Studio to 3.0 in the stable channel and ran the project, DexArchiveMergerException: Unable to merge dex.

Unable to merge dex (Android Studio 3.0) � Issue #448 � paypal , General information SDK/Library version: 2.15.3 (Android studio 3.0) Environment: DexArchiveMergerException: Unable to merge dex�

Android Studio 3.0 Execution failed for task: unable to merge dex, DexArchiveMergerException: Unable to merge dex" My app:build.gradle file: apply I had a number of SDK updates once I upgraded to Android Studio 3.0 and what advantages the version 1.5.0 has, but I'd rather wait until there's a stable�

Comments
  • remove build folder and try again - it worked for me in some cases
  • @pskink from all modules ? or only from :app module?
  • start from :app
  • The third party android-apt plugin is no longer supported. You should switch to the built-in annotation processor support, which has been improved to handle resolving dependencies lazily. from About Android Plugin for Gradle 3.0.0
  • @Selvin I dont have apt in dependencies, I have annotationProcessor
  • Thank you, a lot of thanks!!! How did you find it ...I don't know, but you're greatest developer!!!
  • Thanks for the appreciation!! I actually tried with all your dependencies and based on the dependencies trees(./gradlew :app:dependencies) find out that the package which was conflicting. Once thats done, you just need to make sure that library doesn't include this as some other library is implicitly adding the same "commons-validator" dependencies.
  • Please elaborate why you think that works and how exactly does one do this? You could add a detailed explanation that helps people with similar problems.
  • @NickUnuchek so after removing build folder the problem persists? did you try that?