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 Implementing Designs for Android Adding Push Notifications from Parse.com Setting Up Push Notifications

Riley MacDonald
Riley MacDonald
2,542 Points

Errors after Updating Parse SDK on Android Studio

Hi All,

My code is now showing up with a bunch of errors after deleting the old parse jar file and adding a new one and I am not sure how to fix it. I added the new jar file in the exact same libs folder.

Basically anything that uses the Parse SDK has an error behind it. I tried rebuilding the project and refreshing the libs folder but it did not help.

Anyone have any ideas?

Thanks, Riley

What kind of errors are you getting? Classes not recognized?

Riley MacDonald
Riley MacDonald
2,542 Points

Some example errors that I am getting:

Cannot resolve symbol "ParseUser" Cannot resolve method "getUsername"

etc.

3 Answers

Riley MacDonald
Riley MacDonald
2,542 Points

OK I managed to answer this on my own. I am using Android Studio instead of Eclipse for this project and after updating my build.gradle code I was able to get this to work.

The Parse SDK said that I should add the following code:

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

After trying to use this code and re-syncing I got some errors as it could not find the com.parse.bolts:bolts-android:1.1.2 jar file so instead I changed the code to point directly to jar file like this:

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

Now everything seems to be working fine even though I am still not 100% sure if I have done this correctly :)

Glad you got it resolved! Be sure to mark your answer as the best one, so people perusing the forums know it's been answered.

Tom Schinler
Tom Schinler
21,052 Points

Great job! This was killing me!

Hi Riley MacDonald ! i have been set everything according to instruction and fix the errors after updating parse library according to your instruction, now i run the app and test from parse.com site, on the site it says congrats push has been sent but on the device no push notification has come, what's may be wrong? Help me plz! Thanks in advance.