Meaning

Real meaning

It means that multiple dex files are defining an object more than once.

Meaning in Cocoon

Most of the times this error means that the plugins in your project require different version of the same library, hence, there is a conflict with some plugins in your project.

It can also mean that an Activity is declared twice. This is, again, because two or more plugins have Activities with the same id, which is a conflict.

How to detect it

This error only happens with Android compilations. The chances of encounter with this error increase with the amount of plugins in your project.

As a side note, note that Canvas+ and Webview+ are technically plugins, so a conflict between one of them and a plugin is theoretically possible, even though they are very lightweight when it comes to libraries and Activities.

The error log will contain something like the next piece of text near the end of it:

As you can see, the word “DexMerger” appears more than once, so it is not difficult to identify.

How to solve it

In short you will have to change, get rid or modify the code of, at least, one of your plugins.

Identify plugins in conflict

Knowing the library or Activity causing the conflict from the error log you can go to the source code of the plugins to look for such library/Activity.  Two plugins requiring different versions of the same library are in conflict. Two plugins declaring an Activity with the same id are in conflict.

If your knowledge of Cordova plugins and Android is limited, uninstall every plugin and install them one by one, compiling with each new plugin until getting the error. The last installed plugin is one in conflict. To detect the other, uninstall everyone but the already identified and install one by ona again until getting the error again.