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

Vrezh Gulyan
Vrezh Gulyan
11,161 Points

If you are using Android Studio and cant get parse to work. Click here.

First download and unzip the sdk files from the parse website.

Drag and drop the .jar file the video references into your libs folder. If you don't see it right above the project tree on the left is a drop down menu click on project and you should see a libs folder under the build folder.

Next add this in your build.grade file under dependencies like you do for butterknife or other libraries.

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

SYNC grade!

Add these lines to your manifest.xml file like you did if you made the stormy app so your app has permission to access the internet

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

now inside whatever you named you application.java file in my case and in the video RibbitApplication.java you need an on create method like in the video

 public void onCreate(){
        super.onCreate();

        Parse.enableLocalDatastore(this);

        Parse.initialize(this, "api key", "client id");
    }

Good luck ! That should do it.

jenyufu
jenyufu
3,311 Points

note: replace the API given in by the poster with your own API from Parse.com

        Parse.initialize(this, "E5tyxQDVFwAutEwG8yIJv06QuJ860F17n5I0HN82", "lpMNMuS8O7Uaf1AWoXvp9ohsq3sxoAFBisAG5bwy");

^basically replace that line with the one Parse gave you. Because those codes points to Vrezh's parse backend not yours.

Vrezh Gulyan
Vrezh Gulyan
11,161 Points

Good point jenyufu, I don't want my backend being used -_-

4 Answers

jenyufu
jenyufu
3,311 Points

Its f***king annoying how we are paying money for these courses per month and its been years and they still haven't updated these outdated tutorials while youtube channels like thenewboston and other free courses have already been updated. And they haven't even done the teacher's notes correctly. All the teamtreehouse people need to do is take a day to follow their own tutorial using Android Studio and add adequate thorough teachers notes to cover the differences between the tutorials and building it in Android Studio, but no... they can't bring themselves to do it. Instead we are here trying to figure their mess out. Really unacceptable for paid courses.

Vrezh Gulyan
Vrezh Gulyan
11,161 Points

I feel you.. I have learned a lot in the process trying to sort through the mess for sure though. I've been on stack overflow all day

jenyufu
jenyufu
3,311 Points

Thanks for this post! its much appreciated

is the end result for the build.gradle file suppose to look like this?

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

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

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

?

Vrezh Gulyan
Vrezh Gulyan
11,161 Points

Yea matches mine pretty much exactly I just have a few extra dependencies that you'll add later.

Matthew Barrus
Matthew Barrus
16,731 Points

Just an FYI, I did not need to download the SDK or transfer any files into my project to get it to work. By adding the necessary dependencies to the gradle and resyncing, it automatically downloaded everything it needed

How do I find my application id and client id for the Parse.initialize() within onCreate method?

Vrezh Gulyan
Vrezh Gulyan
11,161 Points

Go to parse.com -> log in -> my apps and then I believe somewhere in settings it is listed.