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

Alex Arzamendi
Alex Arzamendi
10,042 Points

Making okhttp calls inside of a fragment

Hello, I am currently trying to make an okhttp request inside a fragment. Much like we did in the Stormy project, but instead of handling the okhttp request inside of an activity I am trying to do the same thing, but with a fragment instead. The code is currently not working and you can see the entire code example inside a stack overflow question that I already asked (with no good results, they provided explanations of things which I already know, but would like to have active code exmaples)

The question with the code is right here:

http://stackoverflow.com/questions/40771450/null-object-reference-even-after-the-object-has-been-initialized?noredirect=1#comment68768520_40771450