Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug' when building app

I keep getting this error message whenever i run ionic cordova build android Every thing was working fine earlier, but now this is happening, and I can't find out the reason behind it. I had to manually download gradle since my computer didn't have one. Below are the versions Im using


   Ionic CLI                     : 5.4.6 (C:\Users\User\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.8.1
   @angular-devkit/build-angular : 0.802.2
   @angular-devkit/schematics    : 8.2.2
   @angular/cli                  : 8.3.19
   @ionic/angular-toolkit        : 2.0.0


   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 11 other plugins)


   cordova-res : 0.11.0
   native-run  : 0.2.8


   NodeJS : v12.13.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.4
   OS     : Windows 10

Below is the error

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
  The number of method references in a .dex file cannot exceed 64K.
  Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html