Unable to execute dex: Multiple dex files define Lcom/actionbarsherlock/R$attr

Andreas H picture Andreas H · Feb 7, 2013 · Viewed 19k times · Source

I have created a library project for my app. When I try to add the library to a project, I get the following error when trying to run it:

[2013-02-07 04:51:26 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/actionbarsherlock/R$attr;
[2013-02-07 04:51:26 - testfromlibrary] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/actionbarsherlock/R$attr;

I have added the HoloEverywhere library to my library, whereas I have added the ActionBarSherlock library to HoloEverywhere. I am using Eclipse on Windows 7.

Even though I updated the SDK to the latest version, restarted Eclipse, and cleaned the various projects, the error persists.

Does anyone have any idea on how to solve this error? My bin dir is not included to the build path under properties, and I have tried deleting the bin folder altogether.

Thanks!

Answer

Chriskot picture Chriskot · Aug 14, 2013

I found that if I went into properties -> Java Build Path -> Order and Export and removed the Android Private Libraries then my project built fine. There was another support v4 jar in there which was conflicting with action bar sherlocks support v4 library