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 Weather App (2015) Networking Making an HTTP GET Request with OkHttp

OkHttpClient Error when running app in SDK

getting an error message saying "cannot find symbol class OkHttpClient? Any ideas?

Cheers

4 Answers

I'd say that's a Gradle issue. Difficult to say.

What are you doing to create this error - are you running the application or opening Studio?

What are you looking at that shows this error?

Steve.

Hi Steve, Thanks for the reply, I am running the application. I have resolved the issue, just deleted the code and re wrote it so I am guessing it was a syntax error. However when I run the app now, I am told in the main activity Error: Could not access the Package Manager. Is the system running?

I will point out that I am new to this so I appreciate any help and patience :)

Being new is awesome - please do keep at it.

One thing I will say about being new is that you'll get lots of attention but to get to the root of your issue may take some to-and-fro - here's no different!

I shall investigate your error message and see if I can assist ...

However, I love to see that you're doing this absolutely right - ask away! - just keep asking questions. It is, without doubt, the best way for you to learn and also the best way for those trying to answer to learn too! Keep it up!!

I hope to be back to you soon ...

Steve..

Thanks :), I managed to sort it, and then got a HAX error but have that sorted as well, I think I jumped the gun on the question front ha ha, bit of digging and debugging and it seems all good. Thanks again, i'm sure I will be back at some stage with a question :)

Never be afraid to ask - and feel free to tag me! Here to help! :-)

Glad you got it sorted!