Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!