-3

This is my app build.gradle file enter image description here

It shows error in the appcompat dependecy file. I tried clean project and build project and so many ways but still the error shows. This is my error when i run project.

**Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

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

Velayutham M
  • 1,119
  • 14
  • 18

2 Answers2

2

Add this to your app.gradle file

 android {
          defaultConfig {
            multiDexEnabled true
            }
       }

add the dependency also

implementation 'com.android.support:multidex:1.0.0'

it will solve your problem

Sachin Rajput
  • 4,326
  • 2
  • 18
  • 29
1

Do this-:

implementation 'com.android.support:multidex:1.0.0'

This in your build.gradle-:

multiDexEnabled true

under default config

Shivam Oberoi
  • 1,447
  • 1
  • 9
  • 18