0

Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_51\bin\java.exe'' finished with non-zero exit value 2**

My build.gradle:

apply plugin: 'com.android.application'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    repositories {
        mavenCentral()
    }
    defaultConfig {
        applicationId "com.example.user.fbloginsample"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            multiDexEnabled true

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.facebook.android:facebook-android-sdk:4.7.0'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.android.support:multidex:1.0.1'        
}

I've also tried the answers in this SO post, but it didn't work for me: Java.exe finished with non-zero exit value 2 in Android Studio.

Community
  • 1
  • 1
CSM
  • 11
  • 1

0 Answers0