问题
I have searched a lot for this exception, none of the threads helped me.
I got this exception:
Unable to execute dex: Multiple dex files define Ljavax/ws/rs/core/MultivaluedMap;
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Ljavax/ws/rs/core/MultivaluedMap;
I got this exception when I added jersey jars to my 'libs' in android
something weird
when I delete this jar jersey-core-1.17, the exception goes but I start to get another exception when is classdefnotfound exception.
I added the jars in libs folder and I added them in java bath configuration.
I tried clean and rebuild and delete bin and gen folders and restart eclipse and restart windows but nothing word
please help
note
i added my jars using this question Adding a library/JAR to an Eclipse Android project , also i added more jars in previous projects using that question and it works good, so i don't think the problem in adding jars, right?
also
check there is no this single on the jar
edit
回答1:
One of your other jar files also has MultivaluedMap in it. You are going to have to search through those jars and remove any duplicates.
Looking through findJar.com, it is probably jsr311-api-1.1.1.jar. Open it with WinZip and remove the javax\ws\rs\core\MultiValuedMap.class file, save the jar, and replace the new version in your libs folder.
回答2:
The error tells you that somehow you have the same class in different lib files. Are you sure you don't have overlapping jars?
来源:https://stackoverflow.com/questions/16903009/unable-to-execute-dex-multiple-dex-files-define-ljavax-ws-rs-core-multivaluedma