When I`m tring to run my app, I receive the following error:
app:compileDebugNdk UP-TO-DATE :app:compileDebugSources :app:preDexDebug :app:dexDebug 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 ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.8.0_05\bin\java.exe'' finished with non-zero exit value 2
The content of the gradle script is:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
minSdkVersion 10
targetSdkVersion 22
versionCode 289
versionName "2.2.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles 'proguard-android.txt', 'proguard-rules.txt'
}
debug {
debuggable true
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.google.android.gms:play-services-location:7.5.0'
compile 'com.google.android.gms:play-services-maps:7.5.0'
compile('com.facebook.android:facebook-android-sdk:3.23.1') {
exclude group: 'com.google.android', module: 'support-v4'
}
compile('com.crashlytics.sdk.android:crashlytics:2.3.1@aar') {
transitive = true;
}
compile project(':UtilsLibrary')
compile project(':NumberPickerLibrary')
compile project(':drag-sort-listview-lib')
compile project(':GoogleAPI Library')
compile project(':MenuDrawerLibrary')
compile project(':IOLibrary')
compile project(':AR Library')
compile project(':GoogleLicense')
compile project(':android-maps-utils-library')
}
I`m sure that somehow I added twice an of the google libraries.
Thanks.