Build fail on android : DexMergerForDebug


I have a big problem that appeared suddenly … Before that day I could compile my application on my mobile (android) without any problem however, now I have this error that appears and that blocks me completely …

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:app:transformDexArchiveWithDexMergerForDebug’. Multiple dex files define Lcom/google/android/gms/internal/measurement/zzeh;

For information, the application works correctly on the “ionic serve”.

Thank you for helping me…

To clarify, before all that, from the beginning, when I made ionic cordova add android platform I must obligatorily do these steps below:

  • put in android / project.propertie: ‘+’ has all versions
  • put in android / app / build.gradle: multiDexEnabled true
  • make cordova clean android

otherwise I have the following error that appears: Execution failed for task ‘: app: transformClassesWithDesugarForDebug’.

However after these steps it will work properly until today …