Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Self-Destructing Message Android App Adding Users Using Parse.com Creating an Account and App on Parse.com

Error:Execution failed for task ':app:dexDebug'.

Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 2

i'm getting this error compiling, there's something wrong with my gradle.

my gradle file is

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.example.paxie.ribbit"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-    rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.parse:parse-android:1.+'

}
aakarshrestha
aakarshrestha
6,509 Points

Compile parse with this command: compile 'com.parse:parse-android:1.10.3'

I had trouble using bolts. Download parse-android-1.10.3.jar file and add it to the libs folder in your project.

i'm not 100% certain what you mean so i tried the following things:

replaced compile 'com.parse:parse-android:1.+' with 'com.parse:parse-android:1.10.3'

added 'com.parse:parse-android:1.+' in addition to compile 'com.parse:parse-android:1.10.3'

removed compile 'com.parse.bolts:bolts-android:1.+' and added compile 'com.parse:parse-android:1.10.3'

and each of these produced the same error.

I already had downloaded parse-android:1.10.3 and moved it to my external libraries.

halp.

i also realized I hadn't moved the bolts .jar package to my external libraries, so I did that, but got the same error. To be clear, where i'm moving the external libraries to is /home/Documents/Android-Studio/AndroidStudioProjects/Ribbit/app/libs, and I'm running linux.

5 Answers

I think the latest Parse SDK needs more than the *.jar file to compile correctly. I was getting the same error, then I tried these steps:

  1. Download & unzip the SDK. This should create a folder named Parse-1.xx.x (Parse-1.11.0 in my case)
  2. Move the entire folder to /apps/libs (make sure you deleted the previous Parse-*.jar file)
  3. Build > Rebuild project

Then it compiles without errors.

This worked! Thank you!

Ryan Chang
Ryan Chang
3,249 Points

Worked, thanks a ton!

Sam wong
PLUS
Sam wong
Courses Plus Student 447 Points

Bryan Wiedeman did you solve this problem ? i get the same error as you i add this two compile

compile 'com.parse.bolts:bolts-android:1.+' compile 'com.parse:parse-android:1.+'

nope. still having it.

Sam wong
PLUS
Sam wong
Courses Plus Student 447 Points

Getting stuck, no one provide the solution .....

also frustrated by this. if i continue to not get a response, I suppose I'm still not that far along and can download eclipse and try again with that, but that would kind of suck since i'm trying to learn modern development tools and not antiquated ones.

aakarshrestha
aakarshrestha
6,509 Points

I had trouble with boltz file. So i resolved it by following these steps:

  1. Go to: https://github.com/ParsePlatform/Parse-SDK-Android
  2. Download the jar file
  3. Store the downloaded jar file in the src/main/libs folder
  4. Then add the dependency in the build.gradle(module:app) file " compile 'com.parse:parse-android:1.11.0' " -> or whatever is the version number for the jar file.

Do not forget to sync the gradle file!

You are all ready to develop using parse now.

Hope it helps!

Happy coding!