question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android Build issue with latest SDK 2.0.3 - Multiple dex files define Landroid/support/annotation/AnimRes

See original GitHub issue

Hi

I am using the latest master I believe its 2.0.3 and when I build on the android, I am getting the following error:

UNEXPECTED TOP-LEVEL EXCEPTION:

com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;


    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)


    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)


    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)


    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)


    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)


    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)


    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)


    at com.android.dx.command.dexer.Main.run(Main.java:277)


    at com.android.dx.command.dexer.Main.main(Main.java:245)


    at com.android.dx.command.Main.main(Main.java:106)





FAILED


When I remove the branch plugin and try, I am able to build successfully.

Any Thoughts? Cheers

TJ

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
yoniheicommented, Apr 20, 2016

i had this problem with Wizcorp/phonegap-facebook-plugin I moved to https://github.com/jeduan/cordova-plugin-facebook4 didnt have to change even one line of code

1reaction
harshabonthucommented, Mar 12, 2016

Sorry, I think you searched for branch.jar try the exact file name i.e “Branch-1.10.3.jar”.

Can you reset the project i.e removing android platform and adding again ?


-  cordova plugin rm io.branch.sdk
-  cordova platform rm android
-  cordova platform add android
-  cordova build
-  cordova plugin add branch-cordova-sdk --save
-  cordova build

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio Gradle Error: Multiple dex files define
In your build.gradle file try adding the following block inside your android block. dexOptions { preDexLibraries = false }.
Read more >
Enable multidex for apps with over 64K methods
Learn how to enable an app configuration known as multidex, which allows your app to build and read multiple DEX files.
Read more >
Android Studio update to 1.0 corrupts MultiDex [37015085]
I had multi dex working fine in 0.9.3 and after my update to 1.0 I have this error: Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'....
Read more >
Multiple dex files define Lcom/google/unity/BuildConfig
Hi! I'm struggling to create a Unity build for Android (I'm new to Android as a platform). I get this error: ``` Execution...
Read more >
Understanding and Solving the Multidex Problem in Android
To understand what a DEX File is, we will look at the Android build system in a nutshell. This is the stage that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found