FAQ #11653, published on 2015-11-27
A "Merged dex" compilation error when the Android SDK Build-tools 23.0.2 is installed
When the Android SDK Build-tools 23.0.2 is installed you might experience a "merge dex" error :

Failure creating the Android application
[...]
Error returned:
Merged dex #1 (18 defs/24.3KiB)
Merged dex #2 (2187 defs/3355.6KiB)
Result is 2188 defs/4060.8KiB. Took 0.2s

In order to remove this error you need to install an upgrade. This upgrade is available from the Useful resources page.

http://stg.webdev.info/publicationSt_WEB/uk/miseajourst.awp?LANGUE=US

Simply click the "Ask for upgrade" link for Incident number : 95115

Once the upgrade is installed, you will be able to generate your APK again.

See also : apk, android, error, merge, dex, compilation