com.android.dex.DexException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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 ==============
    via by William Sheehan,
  • 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 ==============
    via by William Sheehan,
  • GitHub comment 249#157442111
    via GitHub by rafasegat
    ,
  • GitHub comment 16#157442726
    via GitHub by rafasegat
    ,
  • GitHub comment 352#160175608
    via GitHub by noldotar
    ,
    • com.android.dex.DexException: Multiple dex files define Lcom/google/protobuf
    • ano/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)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    50 more bugmates