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 trialAsim Ashfaq
1,150 PointsokHttpClient auto complete not able to fine the classes
I had sync project with gradle file but still it not able to find the class
Alex Johnson
6,067 PointsI had this same problem and realized that I'd accidentally added
testCompile 'com.squareup.okhttp:mockwebserver:2.5.0'
instead of
compile 'com.squareup.okhttp:okhttp:2.5.0'
to the Gradle build file. Both compile commands are on the OkHttp Github page so you have to choose the right one (compile 'com.squareup.okhttp:okhttp:2.5.0').
Michael Salomon
1,356 PointsMichael Salomon
1,356 PointsMake sure that you placed the dependency in build.gradle(Module: app) and not build.gradle(Project: Stormy). Also, in your MainActivity or the activity which you are building your request you have imported okhttp as in
import com.squareup.okhttp.OkHttpClient;