Android Studio Gradle Error: Multiple dex files define
Now they split bolts-android into bolts-applinks and bolts-tasks .so you need exclude both from the gradle build
compile ('com.facebook.android:facebook-android-sdk:4.10.0'){
exclude group: 'com.parse.bolts',
module: 'bolts-tasks'
exclude group: 'com.parse.bolts',
module: 'bolts-applinks';}
This works perfectly for me !!!!
For me, I was adding Facebook SDK as a project, and set it as dependencies.
However, the exclude work after i switching to use the maven source.
I think it is for maven only, not for project dependencies? (please provide correct info if someone know about this)
In other word, you can now delete the Facebook SDK project and files.
remember to add
repositories {
mavenCentral()
}
if you weren't using maven.
So the build.gradle look like this, I commented out the project way.
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':google-play-services_lib')
compile ('com.facebook.android:facebook-android-sdk:3.23.0'){
exclude module: 'bolts-android'
exclude module: 'support-v4'
}
// compile (project(':FacebookSDK')){
// exclude module: 'bolts-android'
// exclude module: 'support-v4'
// }
compile (project(':UserVoiceSDK')){ exclude module: 'support-v4' }
}