com.android.dex.DexException: Multiple dex files define Lcom/google/protobuf/nano/CodedInputByteBufferNano;

JIRA | William Sheehan | 8 months ago
  1. 0

    Impacted Cases ============== Reproduce Test Steps ==================== Using gradle to build an Android app, with the library [LibPhoneNumber|https://github.com/googlei18n/libphonenumber] results in a build error. 1) Build the CrosswalkDemo with this dependency block in app/build.gradle {code} dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.0' compile 'org.xwalk:xwalk_core_library_beta:18.48.477.11' compile 'com.googlecode.libphonenumber:libphonenumber:7.3.0' } {code} Expected Outcome ================ Successful build Actual Outcome ============== Build output: {code} Dex: Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/protobuf/nano/CodedInputByteBufferNano; UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/google/protobuf/nano/CodedInputByteBufferNano; 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) {code} Test Case Source Code ===================== Test Builds =========== Issue Analysis ==============

    JIRA | 8 months ago | William Sheehan
    com.android.dex.DexException: Multiple dex files define Lcom/google/protobuf/nano/CodedInputByteBufferNano;
  2. 0

    Impacted Cases ============== Reproduce Test Steps ==================== Using gradle to build an Android app, with the library [LibPhoneNumber|https://github.com/googlei18n/libphonenumber] results in a build error. 1) Build the CrosswalkDemo with this dependency block in app/build.gradle {code} dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.0.0' compile 'org.xwalk:xwalk_core_library_beta:18.48.477.11' compile 'com.googlecode.libphonenumber:libphonenumber:7.3.0' } {code} Expected Outcome ================ Successful build Actual Outcome ============== Build output: {code} Dex: Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/protobuf/nano/CodedInputByteBufferNano; UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/google/protobuf/nano/CodedInputByteBufferNano; 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) {code} Test Case Source Code ===================== Test Builds =========== Issue Analysis ==============

    JIRA | 8 months ago | William Sheehan
    com.android.dex.DexException: Multiple dex files define Lcom/google/protobuf/nano/CodedInputByteBufferNano;
  3. 0

    Build failed after reinstalling the plugin @next

    GitHub | 6 months ago | ramveersgh
    com.android.dex.DexException: Multiple dex files define Lorg/apache/cordova/AuthenticationToken; FAILED
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 136#154776294

    GitHub | 1 year ago | globexdesigns
    com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
  6. 0

    Cordova ** BUILD FAILED ** with Android platform

    Stack Overflow | 1 year ago | TundeCanHelp
    com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;

    46 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.android.dex.DexException

      Multiple dex files define Lcom/google/protobuf/nano/CodedInputByteBufferNano;

      at com.android.dx.merge.DexMerger.readSortableTypes()
    2. Android SDK's dx Tool
      Main.main
      1. com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
      2. com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
      3. com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
      4. com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
      5. com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
      6. com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
      7. com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
      8. com.android.dx.command.dexer.Main.run(Main.java:277)
      9. com.android.dx.command.dexer.Main.main(Main.java:245)
      10. com.android.dx.command.Main.main(Main.java:106)
      10 frames