Vavelin Kévin Vavelin Kévin - 7 months ago 85
Java Question

Impossible to run app with Parse

I have an issue with Parse. I had the sdk (downloaded on Parse.com and unzip inside /libs folder in my project) and when I build everything is good.

But when I run the app,I have this following error :

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_66\bin\java.exe'' finished with non-zero exit value 2


I don't know what to do, I search and tried everything I found on StackOverflow and github repo of Parse but nothing works :/

Any idea ?

Thanks in advance for your answer.

Answer

Simple in your gradle file add these ...

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {

    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

    // Enabling multidex support.
    multiDexEnabled true

}

 // add dexOptions
dexOptions {
    incremental true
    javaMaxHeapSize "4g"
}
}


dependencies {
provided fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.parse:parse-android:1.11.0'
 // add multidex dependency 
compile 'com.android.support:multidex:1.0.1'

}

reference: Error:Execution failed for task ':app:dexDebug' error in my project while I added new dependency

Comments