Multiple Dex Files Exception in Android Studio -


Suddenly I get the following error in my project in Android Studio

  Failed for: ap: dex debug '. & Gt; com.android.ide.common.internal.LoggedErrorException: to run a command failed: / Applications / Android Studio.app/sdk/build-tools/android-4.4/dx --dex --output / users / azamsharp / AndroidStudioProjects / SLB / application / Construction / dex / debug / users / azamsharp / AndroidStudioProjects / SLB / apps / build / classes / debug / users / azamsharp / AndroidStudioProjects / SLB / apps / Construction / dependence-cache / debug / users / Azamsharp / AndroidStudioProjects / SLB /app/build/pre-dexed/debug/android-async-http-1.4.4-ebbcd48910e41cec52d1452a5743c94a9159f5e1.jar/ user / azamsharp / AndroidStudioProjects / SLB / app / build / pre-dexed / debug / and Roid-support-v4-6c3868a97cf3c20d5a1f7a32bd415e4ceb4d85e8.jar/Users/azamsharp/AndroidStudioProjects/SLB/app/build/pre-dexed/debug/classes-8df088fb881a9b300721edc9635f1f9db6ecf298.jar/users/zamsharp/AndroidStudioProjects/slb/app/build/pre-dexed/ Debug / gcm-dd10621f5a27ca99ec0a973a9d3d24df75dabba1.jar/Users/azamsharp/AndroidStudioProjects/SLB/app/build/pre-dexed/debug/support-v4-19.0.1-3bf117e59e2e0f41bbf9219f2be90cdcf1d d583d.jar Error Code: 2 Output: Unexpected top-level exception: Com.android.dex.DexException: defined multiple dex files Landroid / support / v4 / accessibilityservice / AccessibilityServiceInfoCompat $ AccessibilityServiceInfoVersionImpl; com.android.dx.merge.DexMerger.readSortableTypes (DexMerger.java:593) on com.android.dx.merge.DexMerger.getSortedTypes (DexMerger.java:551) on com.android.dx.merge.DexMerger.mergeClassDefs on com.android.dx.merge.DexMerger.merge (DexMerger.java:187) on com.android.dx.merge.DexMerger.mergeDexes (DexMerger.java:169) (DexMerger.java:532) on com.android. Dx.command.dexer.Main.mergeLibraryDexBuffers at com.android.dx.command.dexer.Main.runMonoDex (Main.java:287) (Main.java:439) at com.android.dx.command.dexer.Main. Play at com.android.dx.command.dexer.Main.main (main.java:199) at com.android.dx.command.Main.main (main.java103) (Main .java 30)  < / Pre> 

I did nothing with context but I just added an activity and then removed it after some time.

OK, I have the same problem and here's the solution:

Go "build" up and "Clean Project" and it helps me after "rebuilding the project"! Also confirm "files" and may be invalid cache "and can restart Android Studio

cor that manifest is fine and does not include any duplicates!


Comments