多地塞米松文件异常Android Studio中 [英] Multiple Dex Files Exception in Android Studio

查看:276
本文介绍了多地塞米松文件异常Android Studio中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然我得到在我的Andr​​oid Studio项目下面的错误。

All of a sudden I am getting the following error in my project in Android Studio.

Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    /Applications/Android Studio.app/sdk/build-tools/android-4.4/dx --dex --output /Users/azamsharp/AndroidStudioProjects/SLB/app/build/dex/debug /Users/azamsharp/AndroidStudioProjects/SLB/app/build/classes/debug /Users/azamsharp/AndroidStudioProjects/SLB/app/build/dependency-cache/debug /Users/azamsharp/AndroidStudioProjects/SLB/app/build/pre-dexed/debug/android-async-http-1.4.4-ebbcd48910e41cec52d1452a5743c94a9159f5e1.jar /Users/azamsharp/AndroidStudioProjects/SLB/app/build/pre-dexed/debug/android-support-v4-6c3868a97cf3c20d5a1f7a32bd415e4ceb4d85e8.jar /Users/azamsharp/AndroidStudioProjects/SLB/app/build/pre-dexed/debug/classes-8df088fb881a9b300721edc9635f1f9db6ecf298.jar /Users/azamsharp/AndroidStudioProjects/SLB/app/build/pre-dexed/debug/gcm-dd10621f5a27ca99ec0a973a9d3d24df75dabba1.jar /Users/azamsharp/AndroidStudioProjects/SLB/app/build/pre-dexed/debug/support-v4-19.0.1-3bf117e59e2e0f41bbf9219f2be90cdcf1dd583d.jar
  Error Code:
    2
  Output:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:593)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:551)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:532)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:169)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:187)
        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)

我甚至没有做的任何引用。我只是增加了一个活动,然后不久后删除了它。

I did not even do anything with the references. I simply added an Activity and then deleted it shortly after.

推荐答案

好吧,我有同样的问题,这里是解决方案:

ok , I have the same problem and here is the solution:

go在顶部和清洁工程,建设和之后重建工程
它帮助我!
你也可以去文件和缓存失效,并重新启动了Android工作室

Go to "Build" in the top and "Clean Project" and after "Rebuild the project" It helps me! Also you can go to "Files" and Invalidate caches" and restart the Android Studio

科西嘉来确保清单是确定并没有重复包含!

Of corse be sure that manifest is ok and no duplicate includes!

这篇关于多地塞米松文件异常Android Studio中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆