2

I am developing an app, in which I am integrating Facebook login. First I used Facebook sdk 3.8 module dependency, then I used compile 'com.facebook.android:facebook-android-sdk:4.1.0'.
I removed back the fb sdk 3.8 and added 'com.facebook.android:facebook-android-sdk:4.1.0' in gradle.

I get the following error:

Error:Execution failed for task ':dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_60\bin\java.exe'' finished with non-zero exit value 2.
Adinia
  • 3,722
  • 5
  • 40
  • 58

1 Answers1

2

This is because you might have implemented many library file, either you can reduce them by removing unused library from gradle (or) by setting the multidex to true, below code explains how to do it.

defaultConfig {
        applicationId "applicationId"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.1"
        //****Multidex ****
        multiDexEnabled true
    }
Jeevanandhan
  • 1,073
  • 10
  • 18