Unable to execute dex: Multiple dex files define Lcom/myapp/R$array;

后端 未结 30 2119
迷失自我
迷失自我 2020-11-22 00:31

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 - De         


        
相关标签:
30条回答
  • 2020-11-22 01:00

    I was basically facing the same issue. I deleted the BIN folder, then removed unused jar files for Order and Import from eclipse. IT WORKED after that

    0 讨论(0)
  • 2020-11-22 01:01

    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:

    1. 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
    2. 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
    3. 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!

    0 讨论(0)
  • 2020-11-22 01:02

    found a solution i believe??

        [2013-04-28 23:56:09 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/coremedia/iso/AbstractBoxParser$1;
    

    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)

    0 讨论(0)
  • 2020-11-22 01:03

    Go to Project/properties and Java Build Path and unchecked the Android Private Libraries.

    This is also another case for this kind of error

    Done

    0 讨论(0)
  • 2020-11-22 01:03

    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.

    0 讨论(0)
  • 2020-11-22 01:03

    [Solved for me]

    by removing the duplicate library "JAR file" then remove BuildConfig.java file, Clean project and its work.

    0 讨论(0)
提交回复
热议问题