Sometime between the last time building and launching, a new library appeared mysteriously in my project: "Android Private Libraries" containing the support library I was already referencing. So this mysterious "multiple dex files define ____" appeared. Checking the Java Build Path and seeing this new item, and unchecking the originally-included support library solved the problem for me.
–
Tom PaceSep 26 '13 at 17:20

9

Thanks a lot. This is the correct solution. I really do not know why eclipse has this much bugs. Now the situation is like only 2 hours I can code and 6 hours I have to find solution to this kinds of unnecessary issues.
–
roy mathewNov 1 '13 at 8:47

27

In Order and Export tab I did not have any jar library there, so I have unchecked Android Private Libraries item. Now my project is running.
–
Junior MayheJan 18 '14 at 22:57

1

In my case I had a dublicate of ´android-support-v4.jar´. When i deleted it, the error went away
–
ymerdrengeneJul 17 '14 at 13:01

My problem was resolved after cleaning up some directories and files left over from the previous versions of the tools. ADT Rev 14 changes where binaries are stored. I deleted the entire bin directory, restarted Eclipse and cleaned the build and forced a rebuild. That seemed to do the trick initially but the problem came back after the next run.

I finally discovered that my bin directory was included in the project build path. I excluded bin from the build path and repeated the steps above. This resolved my problem.

What the heck Google. This problem keeps coming back even with R15.
–
terryOct 29 '11 at 2:33

2

I edited the solution above to include the final resolution. Resolved permanently now.
–
terryNov 8 '11 at 16:04

7

In short, no one really knows why the problem happens, what it means and how to fix it (I don't have any bin directory in the Java Build Path). I avoided updating to R15 for these reasons, staying with R9. But I am still having a similar problem, with no clue in sight. Any tip or help would be greatly appreciated.
–
Bill The ApeJan 4 '12 at 17:28

This problem was happening me, I had an external .jar in my libs folder called gson-2.2.2.jar but for some reason there were two of them, gson-2.2.2.jar and gson-2.2.2.jar(1), I simply deleted the latter and my project built fine again.

I had a similar issue when there was an old jar file in the libs folder and linked it to a newer jar in the same workspace. When ADT finds multiple definitions for the same symbol it puts an error like this. Deleting the old jar file in the libs folder fixed it for me.
–
phyattOct 1 '13 at 0:13

I was getting this error after adding the facebooksdk.jar to a project that already had dependencies on the android-support-v4.jar. Since the facebooksdk.jar already includes its own android-support-v4.jar there were conflicts. Removing the earlier android-support-v4.jar from the projects Properties / Java Build Path / Libraries resolved the issue for me.

This error can happen if you have two jars that contains the same class names, e.g. I had two library: jsr311-api-1.1.1.jar, and jersey-core-1.17.1.jar, both containing the class javax.ws.rs.ApplicationPath. I removed jsr311-api-1.1.1.jar and it worked fine.

For me this problem only exists as long as there are Android library projects involved in my project. So when I remove all the libraries and do as you said I can run my app again.
If there are libraries involved even the bin-removal-trick trick won' work.

I don't get why this bug first appeared today since I'm using ADT 14 for several days now. Well there were other bugs that kept me happy though.

I'm late to this party, but adding my own experience so I can find it again later :)

I ran into this problem after upgrading the android sdk and eclipse ad-ins. No upgrade goes unpunished!

The problem for me was related to library projects, my app references both standard java projects and android library projects. I noticed the Java Build Path settings were including the android library projects src and res folders in the Source list (upvotes to everyone that mention bin in source being issue, src and res was also an issue.)

So the solution was:

Remove all referenced Android libraries source and project references from the Java Build Path section of the settings in both Source list and Project list

Make sure pure java dependencies are listed in Project list, and Checked in the Order and Export tab so the classes are included in the apk

Make sure all Android library dependencies are listed on the Android section of project properties, in the library section below the checked SDK versions.

It was along way to piece all that together from the other solutions! Phew!

One more thing... it appears that if you don't need to export the Android Private Libraries of a project or library project, don't. If more than one project or library project exports it, you'll get the multiple dex files error.
–
strangeluckSep 27 '13 at 12:28

Where it says : "Lcom/coremedia/iso/AbstractBoxParser$1" that just happen to be the location of the library I imported that was causing the issue. Looked for com.codemedia.iso.AbstractBoxParser$1.class and .AbstractBoxParser.class.... took that jar, unpackaged it, removed both of those files, then repackaged as a .zip, added to library, cleaned and worked! no more conflict for me! (also no updates or additional downloads)

I had two different versions of Cordova .jar-files in my libs folder, I deleted the one I wasn't even using and it worked right away.
Weird because I didn't notice that before and it worked before and then suddenly stopped working...

I have several library projects with the same package name specified in the AndroidManifest (so no duplicate field names are generated by R.java). I had to remove any permissions and activities from the AndroidManifest.xml for all library projects to remove the error so Manifest.java wasn't created multiple times. Hopefully this can help someone.

I had a similar problem when I added ActionBarSherlock as a library in my project. Eclipse ADT v21.0 pre-created dex files supposedly for faster building of the project. These dex files were the same as some of the jar files in my lib folder. So just keep one and delete the other. I deleted the ones in the lib folder as the dexed files were generating automatically.