构建Android项目的意外顶级异常

时间:2014-07-18 17:14:00

标签: android android-studio

我通过SVN与配偶分享了一个项目,这是我第一次升级,它有效,但每次我进行升级或恢复时出现同样的错误,项目在构建时失败,在我的其他个人项目中没发生。

Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:preDexDebug UP-TO-DATE
:app:dexDebug

UNEXPECTED TOP-LEVEL EXCEPTION:
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    C:\Desarrollo\Android\adt-bundle-windows-x86_64-20140321\sdk\build-tools\19.1.0\dx.bat --dex --num-threads=4 --output C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\dex\debug C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\classes\debug C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\dependency-cache\debug C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\pre-dexed\debug\classes-4cd969c5a2336e63047b8ffdfe0b5c92cf458361.jar C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\pre-dexed\debug\classes-5b2459de5b6d6da358967ca597c9aabd60f181f2.jar C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\pre-dexed\debug\classes-93c27da75290c72ca476199e4d33e535dc0bf965.jar C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\pre-dexed\debug\ormlite-android-4.48-4f3cc0124d8eff4f2073ff3a46792cfc91b2624f.jar C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\pre-dexed\debug\ormlite-core-4.48-0bd95a1a663c4fb0739f1301182b5ca19716a32d.jar C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\pre-dexed\debug\support-v4-19.1.0-1d2f24f516d954aa629536574454148d4ea5ab29.jar C:\Users\fnac\AndroidStudioProjects\TouristProject\app\build\intermediates\pre-dexed\debug\support-v4-19.1.0-dac73c3265d0201b25f957879432f8f58282790b.jar
Error Code:
    2
Output:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Multiple dex files define Landroid/support/v7/app/ActionBar$Callback;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
        at com.android.dx.command.dexer.Main.run(Main.java:230)
        at com.android.dx.command.dexer.Main.main(Main.java:199)
        at com.android.dx.command.Main.main(Main.java:103)

    Information:BUILD FAILED

1 个答案:

答案 0 :(得分:0)

你有很多重复的jar文件。

有人将app\build\intermediates\pre-dexed\debug目录上传到svn,现在你有了重复项。

不应该上传该目录。删除它。