Skip to content
Advertisement

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex in Android Studio 3.0 [closed]

This is my app level gradle file:

JavaScript

The complete error I get when compiling the project is:

Error:Execution failed for task ‘:app:transformDexArchiveWithExternalLibsDexMergerForDebug’.

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

The complete error is as follows:

JavaScript

Advertisement

Answer

Enable Multidex through build.gradle of your app module

JavaScript

Same as below –

JavaScript

Then follow below steps –

  1. From the Build menu -> press the Clean Project button.
  2. When task completed, press the Rebuild Project button from the Build menu.
  3. From menu File -> Invalidate cashes / Restart

compile is now deprecated so it’s better to use implementation or api

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement