Gradle build failure when trying to use Facebook SDK

You're adding the android support library twice, resulting in a dex merge conflict. Your main project refers to the maven library with 'com.android.support:support-v4:13.0.+' and your Facebook project refers to it with files('libs/android-support-v4.jar'). Gradle cannot resolve conflicts between local jar files, so you must refer to them through maven.

Modify the dependencies section of your Facebook build.gradle to:

dependencies {
    compile 'com.android.support:support-v4:13.0.+'
}

and everything should work.