Build fail on android : DexMergerForDebug


#1

Hello,

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’.
com.android.build.api.transform.TransformException: com.android.dex.DexException: 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…


#2

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 …