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 trialNavneeth Ramprasad
740 PointsCreating an instance of the OkHttpClient class is throwing me an error
Please answer
3 Answers
Greg Schmidt
5,908 PointsPlease provide the class and error details
Jesse Gravenor
27,272 PointsI had a similar problem at this stage. I tried everything several times and it was not my code. I think it is related to the version of android studio that I am running and the version of the OKHttp dependency that I was loading in the Gradle file. When I changed the dependancy from: compile 'com.squareup.okhttp:okhttp:2.2.0' to 2.1.0, as was shown in the video everything worked from there. I hope this helps your!
Raif Deari
1,111 PointsMake sure you have removed "test" from compile 'com.squareup.okhttp:okhttp:2.1.0'
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherNavneeth;
Welcome to Treehouse!
I know it is frustrating to be getting errors in you code, but if you would post the code you are trying and the errors you are getting with that code it will greatly help forum users to assist in debugging your code.
Ken