I try to generate an apk with cordova and I get this error with this command:
cordova build android --release
- What went wrong:
Execution failed for task ‘:app:transformDexArchiveWithDexMergerForRelease’.
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
How can I solve it? or what am I doing wrong?