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

后端 未结 30 2639
迷失自我
迷失自我 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: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!

提交回复
热议问题