gpt4 book ai didi

android - Android Studio中多个Dex文件异常

转载 作者:行者123 更新时间:2023-11-29 17:52:44 24 4
gpt4 key购买 nike

我在 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)

我什至没有对引用文献做任何事情。我只是添加了一个 Activity ,然后不久就删除了它。

最佳答案

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

转到顶部的“Build”和“Clean Project”,然后“Rebuild the project”它帮助到我!您也可以转到"file"和“使缓存无效”并重新启动 Android Studio

当然要确保 list 是正确的,并且没有重复的内容!

关于android - Android Studio中多个Dex文件异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21860292/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com