Since updating to ADT
14 I can no longer build my project. It was building fine prior to updating.
The error:
[2011-10-23 16:23:29 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;
[2011-10-23 16:23:29 - myProj] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;
Similar issues have been reported and I have tried the suggestions there including
- Restarting
Eclipse
. - Cleaning the project and rebuild - Disable "Project->Build Automatically" option, then "Clean" and "Build" project, then try to run. reset "Build Automatically" option to On
- Re-installing the
Android
Developer Tools - Re-installing Eclipse (updated to the latest version 3.7.1)
- Created a new project importing from the file system
- Created a new project from subversion.
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:
It was along way to piece all that together from the other solutions! Phew!
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.
Deleting the bin folder was not enough, I also deleted the gen folder. Then after two rebuilds the dex error message was gone.
found a solution i believe??
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 was facing the same issue then i saw while pushing my app some jar files which were loaded twice hence multiple dex error .Just go to your project properties -> Java Build Path and try unchecking jar which is being loaded twice.