1

MY LOGCAT DESCRIPTION :

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)
    Error:Execution failed for task ':XXXX:dexDebug'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_76\bin\java.exe'' finished with non-zero exit value 2
    Information:BUILD FAILED
    Information:Total time: 20.04 secs
    Information:1 error

Information:0 warnings
Information:See complete output in console

MY GRADLE FILE :

dependencies {
    //compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':appcompat_v7')
    compile 'com.braintreepayments.api:braintree:1.+'
    compile 'com.squareup.okhttp:okhttp:2.3.0'
    compile 'com.loopj.android:android-async-http:1.4.5'
    compile 'com.google.android.gms:play-services-wallet:7.5.0'
}
Somesh Kumar
  • 8,088
  • 4
  • 33
  • 49
Tony Stark
  • 451
  • 1
  • 3
  • 11

1 Answers1

1

There are multiple support libraries in your project. You can try below steps :

  1. Open your project folder in windows explorer(Windows)/finder(Mac). Check your project's libs folder and any support library's (such as appcompact_v7) libs folder.

  2. Check if you have multiple JAR files with same name.

  3. If you have multiple JAR files such as android-support-v4 then remove one of the JAR file

  4. Clean project.

  5. Run.

Somesh Kumar
  • 8,088
  • 4
  • 33
  • 49