Wednesday, 23 May 2018

android - "Conversion to Dalvik format failed with error 1" on external JAR




In my Android application in Eclipse I get the following error.




UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lorg/xmlpull/v1/XmlPullParser;
....
Conversion to Dalvik format failed with error 1




This error only appears when I add a specific external JAR file to my project. I searched for a long time for the possible solution, but none of the possible solutions work. I even tried to change to Android 1.6 instead of 1.5 (the current version I use).


Answer



I solved the problem.




This is a JAR file conflict.



It seems that I have two JAR files on my buildpath that include the same package and classes.



smack.jar and android_maps_lib-1.0.2



Deleting this package from one of the JAR files solved the problem.


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...