In my Android application in Eclipse I get the following error.
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already add
I found something else. Android uses the /libs
directory for JAR files. I have seen the "Conversion to Dalvik format failed with error 1" error numerous times, always when I made a mistake in my JAR files.
Now I upgraded Roboguice to a newer version, by putting the new JAR file in the /libs
directory and switching the class path to the new version. That caused the Dalvik error.
When I removed one of the Roboguice JAR files from the /libs
folder, the error disappeared. Apparently, Android picks up all JAR files from /libs
, regardless of which ones you specify in the Java build path. I don't remember exactly, but I think Android started using /libs
by default starting with Android 4.0 (Ice Cream Sandwich, ICS).