mathewdenis / json-smart

Automatically exported from code.google.com/p/json-smart
0 stars 0 forks source link

Multiple dex files define Lorg/objectweb/asm/AnnotationVisitor; #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a project with Android Studio.
2. Add this library as dependency or other library that depends on this project.
3. Compile the app.

What is the expected output? 

Expected to compile the app.

What do you see instead?

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    /Users/josergc/Downloads/adt-bundle-mac-x86_64-20140702/sdk/build-tools/android-4.4W/dx --dex --no-optimize --output /Users/josergc/AndroidStudioProjects/HighscoreTablesdemoapp/app/build/intermediates/dex/debug /Users/josergc/AndroidStudioProjects/HighscoreTablesdemoapp/app/build/intermediates/classes/debug /Users/josergc/AndroidStudioProjects/HighscoreTablesdemoapp/app/build/intermediates/pre-dexed/debug/highscores-client-2.0-728a3e98c0a502bb6e35c7480f24a74eccc2b51c.jar /Users/josergc/AndroidStudioProjects/HighscoreTablesdemoapp/app/build/intermediates/pre-dexed/debug/asm-3.3.1-eec493accd3250ed8940f36b12c098a20aad979b.jar /Users/josergc/AndroidStudioProjects/HighscoreTablesdemoapp/app/build/intermediates/pre-dexed/debug/json-smart-2.1.0-6f343fae5a6ab187c76211e9282667ecbff4e1f0.jar /Users/josergc/AndroidStudioProjects/HighscoreTablesdemoapp/app/build/intermediates/pre-dexed/debug/asm-1.0.2-a4695c92b9972346fd8d0c434169e59ebb15dad6.jar
  Error Code:
    2
  Output:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Multiple dex files define Lorg/objectweb/asm/AnnotationVisitor;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
        at com.android.dx.command.dexer.Main.run(Main.java:230)
        at com.android.dx.command.dexer.Main.main(Main.java:199)
        at com.android.dx.command.Main.main(Main.java:103)

What version of the product are you using? On what operating system?

Please provide any additional information below.

Android Studio uses gradle. With Maven+Eclipse, this problem doesn't occur.

Original issue reported on code.google.com by ehehdada...@gmail.com on 5 Feb 2015 at 3:15

GoogleCodeExporter commented 9 years ago
What version of the product are you using? 

<dependency>
        <groupId>net.minidev</groupId>
        <artifactId>json-smart</artifactId>
        <version>2.1.0</version>
</dependency>

On what operating system?

Mac

Original comment by ehehdada...@gmail.com on 5 Feb 2015 at 3:17

GoogleCodeExporter commented 9 years ago
This is likely because the jar packages the asm classes.  Worst the jar 
packages and old version of the asm classes.  Looks like asm 3.3.1.  
Regardless, if you have anything else on your classpath that uses these classes 
or even the newer classes then you will get this.

Original comment by wbeckw...@gmail.com on 12 Feb 2015 at 2:39

GoogleCodeExporter commented 9 years ago
I have just upgrade asm deps to the last org.ow2.asm.asm 5.0.3.

asm pkh will be renamed in the same release.

Original comment by uriel.chemouni on 11 Mar 2015 at 8:42

GoogleCodeExporter commented 9 years ago
Has anyone resolved this?

Original comment by jaredsburrows@gmail.com on 23 Jul 2015 at 2:28