-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException thrown when 'switchToNewUser()' method is called on StatefulAuthHelper #3
Comments
Please post code |
Yep, sure thing. By that I meant literally the only thing I purposefully changed was the name of the class, but here's the code: RedditAppHelper (Formerly App)
RedditLogin (Formerly NewUserActivity)
|
Is this anything you could possibly help with? |
|
Sorry, I didn't mean to close this. If you can't help me, that's fine, but I think you might be the only person that could assist me with this very specific issue. |
Wait, no, Matt, that was an accident, I didn't mean to quote you like that lol. I was just trying to make a comment. |
Fix that worked for me was that I added |
Thanks, I'll try this out. |
I took my code basically verbatim from the Android example, but changed some of the class names. That's about it, and everything works fine when I run the example app itself. The full error is as follows:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'net.dean.jraw.oauth.StatefulAuthHelper net.dean.jraw.oauth.AccountHelper.switchToNewUser()' on a null object reference at com.digitalnode.glc22.feedr.LogInActivities.RedditLogin.onCreate(RedditLogin.java:59)
The line it is referring to is below:
final StatefulAuthHelper helper = RedditAppHelper.getAccountHelper().switchToNewUser();
I figure it's a really simple mistake that I've made, but I'll post my full classes if needed.
The text was updated successfully, but these errors were encountered: