I have reviewed several questions on here already regarding this matter but none are similar enough to my problem.
I am using the Wahoo Fitness Android API to get data from a heart rate monitor, this API depends on the main project having libGoogleAnalyticsServices.jar as a dependency which is fine until an App Engine backend module is added to the project. My dependencies from the build.gradle file below from module app.
dependencies {
compile files('libs/androidapi.jar')
compile files('libs/jEN.jar')
compile files('libs/json-simple-1.1.1.jar')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.github.johnkil.android-robototextview:robototextview:2.1.0'
compile 'com.android.support:cardview-v7:21.0.3'
compile 'com.android.support:recyclerview-v7:21.0.3'
//compile project(path: ':backend', configuration: 'android-endpoints')
compile files('libs/libGoogleAnalyticsServices.jar')
}
And this is the error message which is shown when compiling/building.
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
UNEXPECTED TOP-LEVEL EXCEPTION:
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)
:app:dexDebug
:app:preDexDebug
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 ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_20\bin\java.exe'' finished with non-zero exit value 2
Information:BUILD FAILED
I am assuming that they are depending on the support library or something along those lines with different version numbers or there are duplication's of a dependency. Any ideas would be greatly appreciated!