I was trying to code a simple android app and i get this error message.Please help
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command: D:\Users\user\AppData\Local\Android\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output C:\Users\user\Desktop\SocialNetworking\app\build\intermediates\dex\debug --input-list=C:\Users\user\Desktop\SocialNetworking\app\build\intermediates\tmp\dex\debug\inputList.txt Error Code: 2 Output: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lbolts/AggregateException; 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)
My gradle build is as follows
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "jason.orchid.com.socialnetworking"
minSdkVersion 19
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories { mavenCentral() }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.parse.bolts:bolts-android:1.1.4'
compile 'com.facebook.android:facebook-android-sdk:3.23.0'
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
}