2


I know that there are a lot of posts about this exception but non of them seemed to be helpful. I have deleted all the bin and gen folders, i have removed all library dependencies and added them again but this issue still remains. This is the exception I get:

[dex] Pre-Dexing /home/me/dev/Workspaces/FacebookSDK/libs/android-support-v4.jar -> android-support-v4-40c394661b7676703ffc1366ddef840c.jar
  [dex] Converting compiled files and external libraries into /home/me/dev/Workspaces/MyApp/bin/classes.dex...
   [dx] 
   [dx] UNEXPECTED TOP-LEVEL EXCEPTION:
   [dx] com.android.dex.DexException: Multiple dex files define Lcom/my/app/Manifest$permission;
   [dx]     at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:593)
   [dx]     at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:551)
   [dx]     at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:532)
   [dx]     at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:169)
   [dx]     at com.android.dx.merge.DexMerger.merge(DexMerger.java:187)
   [dx]     at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
   [dx]     at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
   [dx]     at com.android.dx.command.dexer.Main.run(Main.java:230)
   [dx]     at com.android.dx.command.dexer.Main.main(Main.java:199)
   [dx]     at com.android.dx.command.Main.main(Main.java:103)
   [dx] 

could be something with the manifest merger? didn't find anything unusual in my manifests files (app and libraries etc..) App compiles and works when built and launched from eclipse.
Any ideas?
Thanks!

Lavekush Agrawal
  • 6,040
  • 7
  • 52
  • 85
Mr T.
  • 4,278
  • 9
  • 44
  • 61

1 Answers1

0

Consider showing your AndroidManifest.xml and build.gradle files here.

This problem is mainly because you are trying to compile two modules (mainly app and library) with same package-name for your app. Try to change your package-name for a while, to see if that's the case.

Also this problem has been seen when libraries are added more than one time accidently. Try to see how you're compiling the libraries.

Nitsshukla
  • 27
  • 1
  • 7