0

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

enter image description here

edit

enter image description here

Community
  • 1
  • 1
Smolina Fezaphitsh
  • 347
  • 2
  • 4
  • 14

2 Answers2

2

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.

Ken Wolf
  • 23,133
  • 6
  • 63
  • 84
0

The error tells you that somehow you have the same class in different lib files. Are you sure you don't have overlapping jars?

Peterdk
  • 15,625
  • 20
  • 101
  • 140