Unable to start application using Parse

I have a problem with Parse. I had sdk (loaded on Parse.com and unpacked the folder inside / libs in my project), and when I build everything is fine.

But when I run the application, I have the following error:

Error: execution completed 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 '' completed with nonzero exit value 2

I do not know what to do, I searched and tried everything that I found in StackOverflow and the github repo from Parse, but nothing works: /

Any idea?

Thanks in advance for your reply.

+2
source share
3 answers

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 when I added a new dependency

+7
source

Try cleaning the project (Build -> Clean Project) or try adding this:

 defaultConfig {
     multiDexEnabled true
 }

to build.gradle file

+3
source

build.gradle(: )

dependencies{
...
...
compile 'com.parse.bolts:bolts-android:1.+'
compile fileTree(dir: 'libs', include: 'Parse-*.jar')
}

multiDex.

Hope this works.

0
source

Source: https://habr.com/ru/post/1623215/


All Articles