2

I'm trying to build my app on android with Cordova and the Wikitude AR plugin. It's working perfectly fine on iOS but once I attempt an android build, it gives me the following error:

* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/cordova/PermissionHelper.class

Removing and adding the platform is not an option. Any ideas what could be causing this?

Joe Scotto
  • 10,936
  • 14
  • 66
  • 136
  • Probable cause and solution: https://stackoverflow.com/a/46562523/777265 – DaveAlden Aug 17 '18 at 18:24
  • @DaveAlden I have tried the solutions in that answer, when attempting to remove the compat plugin I get the following `Error: Cannot find plugin.xml for plugin "cordova-plugin-badge". Please try adding it again.` – Joe Scotto Aug 17 '18 at 18:27
  • That indicates a plugin which is partially present in the project: check for/remove `plugins/cordova-plugin-badge` and check `plugins/fetch.json` for a ghost entry. Failing that I would `rm -Rf plugins/` or re-install all plugins. – DaveAlden Aug 18 '18 at 07:32
  • BTW you will may still need to remove/re-add the platform to rebuild it with correct source files – DaveAlden Aug 18 '18 at 07:33

1 Answers1

1

Had to manually remove the plugin cordova-plugin-badge and then cordova plugin remove cordova-plugin-compat --force.

After I reinstalled cordova-plugin-compat@1.2.0 and my app built, seemed like the two plugins were tripping up on one another.

Joe Scotto
  • 10,936
  • 14
  • 66
  • 136