4

I have a Cordova application which has the Facebook and PushNotification plugins installed.

When I try to build my application I get the following error:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotat
ion/AnimRes;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:45
4)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)

:dexDebug FAILED

This indicates there's a jar clash in application. Facebook plugin uses android-support-v4 and PushPlugin uses android-support-v13.

I have android-support-v4.jar, bolts-android-1.1.2.jar and BUCK as libs in facebook plugin and gcm.jar in Push Plugin.

How can I avoid this jar clash?

Huey
  • 5,110
  • 6
  • 32
  • 44
Nehil Mistry
  • 1,101
  • 2
  • 22
  • 51

0 Answers0