Unable to execute dex: Multiple dex files define Ljavax/ws/rs/core/MultivaluedMap exception

不问归期 提交于 2019-12-25 07:07:15

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!