**Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex**
**Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex**
Copyright © 2021 Jogjafile Inc.
Step1: Modify the module-level build.gradle file to enable multidex and add the multidex library as a dependency, as shown here:
Step 2: If you do override the Application class, change it to extend MultiDexApplication (if possible) as follows:
Or if you do override the Application class but it's not possible to change the base class, then you can instead override the attachBaseContext() method and call MultiDex.install(this) to enable multidex:
More info please check this link