• Register
0 votes

Problem :

I have the Android Studio Beta. I have created the new project with compiling my old modules but when I tried launching my app it did not launch and it gave me the below message:

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

But I am unable to know how to fix above error. I researched on this for hours but with no success.

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Sometimes you only need to eliminate the warnings and your error will be disappeared automatically. Please see below special case:

I had below listed two dependencies in my module-level build.gradle file:


implementation 'com.android.support:appcompat-v7:27.0.2'

implementation 'com.android.support:recyclerview-v7:27.0.2'

And the Studio had warned me as below (in addition to dex merging problem):

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.0.2, 21.0.3. Examples include com.android.support:animated-vector-drawable:27.0.2 and com.android.support:support-v4:21.0.3

So I explicitly determined a version of com.android.support:support-v4 and my both the problems (the warning and a one which was related to dex merging) solved:

implementation 'com.android.support:support-v4:27.0.2'  // Just added this line (according to above warning message)

implementation 'com.android.support:appcompat-v7:27.0.2'

implementation 'com.android.support:recyclerview-v7:27.0.2'

And it fixed my issues.


I also had a same problem when I tried to update from com.google.android.gms:play-services:11.2.2 to com.google.android.gms:play-services:11.4.0. Below method solved it for me:

1.      clean

2.      rebuild

9 7 4
38,600 points

Related questions

0 votes
1 answer 91 views
Problem : I have updated my Android Studio to 3.0 but now facing the lot of issues.. So now stopped on the point with below issue: Could not resolve all files for configuration ':applib:_lintClassPath'. > Could not find com.android.tools.lint:lint-gradle:26.1.0-alpha01. ... project :applib I am currently using latest gradle version as: "gradle-4.2.1-all.zip". Does anyone know what my issue can be?
asked Dec 17, 2019 alecxe 7.5k points
0 votes
2 answers 182 views
Problem : My android studio was getting build error while build execution as following: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex"
asked Dec 4, 2019 alecxe 7.5k points
0 votes
1 answer 79 views
Problem : Facing following error related to class path error:could not determine the class-path for interface com.android.builder.model.androidproject.
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 547 views
Problem : Using new android studio with new 3.0.0 Gradle pluging. When building some warning occurred as follows: registerResGeneratingTask is deprecated, useregisterGeneratedFolders(FileCollection)
asked Nov 30, 2019 alecxe 7.5k points
0 votes
1 answer 503 views
Problem : Recently I have updated to Android Studio 3.1. But my project is not running anymore. I have searched for the solution all over the internet with zero positive results. Below is the error that I get in my Logcat: “Java.lang.noclassdeffounderror: ... sdk:4.+'     implementation 'com.parse:parsefacebookutils-v4-android:1.10.3@aar'     implementation 'com.commit451:PhotoView:1.2.4' }
asked Jan 30, 2020 jwilliam 3.9k points
1 vote
1 answer 336 views
Problem : After updating my android studio, I am facing below error. How can I fix this error?? org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. at org.gradle ... .execute(SessionFailureReportingActionExecuter.java:63) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:53)
asked Dec 11, 2019 alecxe 7.5k points
0 votes
1 answer 9 views
I am trying to obtain the latitude and longitude value from the address using PHP.
asked Sep 25, 2020 Daniel Anderson 4k points