While running $ ionic cordova build android the build fails.
Tried to install the npm plugin cordova-android-support-gradle-release but got this issue: https://github.com/dpa99c/cordova-android-support-gradle-release/issues/42
There's actually no specific code I've written for this to happen.
FAILURE: Build failed with an exception.
- 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: Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. Program type already present: org.apache.cordova.BuildHelper