Eclipse, Android: Unexpected Unable to execute dex: Multiple dex files define

12,027

Solution 1

I couldn't fix it so I ended up by creating new project in a different workspace and copied all the code to the new project. It's not the smartest thing but what can I do..

Solution 2

Remove android-support-annotations.jar from libs folder. As these annotations are already included in recent versions of the android-support-v4.jar file.

Solution 3

I lost several hours too in this problem but i think that I found a solutión, at least for my. Andoid Studio said me that i had "Multiple dex files define Landroid/support/annotation/AnimRes;" but he said also had a file call inputList.txt that had a bug. Well, i found this file in directory tree and i found in app/build/intermediates/tmp/dex/debug folder. The file is a simple textfile that had one row for each dependence as support-annotations or androidplot-core with a absolute path.

I saw several row repeated and i thought that if i remove i solve the problem, but it didn't work.

Then I searched this route and all .jar are in the same place: app/build/intermediates/pre-dexed/debug/ folder, and I saw repeated .jar files and I removed this, after i went to the file and I erased repeated rows too.

Then I run my project and the bug disappeared, the problem it solved.

The problem was then: .jar files duplicated in that folder.

Easy!

Solution 4

I have same problem. I think it was happen because there are modification in bin folder contents when I update project repository with tortoise SVN. I have removed bin, and Eclipse generate new one but the problem still persist. But I resolved problem by removing android dependency library. Here the steps :

Select Project -> Right Click -> Select Build Path -> Configure Build Path -> In Libraries tab remove Android Dependencies -> OK. Then clean the project and run again. :)

Share:
12,027
dephinera
Author by

dephinera

Updated on June 16, 2022

Comments

  • dephinera
    dephinera almost 2 years

    The problem: I can't built my project. When I try the following sign is shown in the Console:

    [2014-09-28 23:49:30 - Dex Loader] Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes;
    [2014-09-28 23:49:30 - Shop] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Landroid/support/annotation/AnimRes;
    

    I lost hours of searching for a solution for this problem, but no result.. I tried to clean the project, to delete the bin folder etc. but nothing worked..

    Please, help, I don't know what to do..