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 Getting the OkHttp Library Using Gradle

okHttp Library Problem

I am running Android Studio 1.0.1, i did all the steps to include okHttp library , i put the compile 'com.squareup.okhttp:okhttp:2.2.0' in the build .gradle(app) file in the dependency , then synced the gradle

then all okHttp libraries generated in the (libs) but when i try to declear anew okHttpClient object , it's tell me that cann't resolve symbol squareup

I tied also to download the Stormy project but i got the same result

please provide my with solution of this error , and any help will highly appreciated

1 Answer

Ok i just solved it by invalidate caches/Restart

File --->invalidate caches/Restart

Harry James
Harry James
14,780 Points

Glad to hear you got the problem fixed Khaled!

I've moved your comment to an answer and marked it as the Best Answer so that other users know that it has been answered :)