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

Problem of the grade compiler

So I've been following the weather app.....I pasted the "compile com.squareup.okttp:okhttp:2.3.0" line of code. But after that, I tried to compile the gradle and this error showed...... Error:(25, 13) Failed to resolve: com.squareup.okhttp:okhttp:2.3.0 ... Could the problem be because I have Java 1.8 installed instead of 1.7, but you said 1.7 and above should work?......

2 Answers

Did the OKHTTP files finish downloading?

Does your include line look like:

compile 'com.squareup.okhttp:okhttp:2.2.0'

I can see there's a newer version released - I shall upgrade my app now and see if that causes problems like you are experiencing.

It should't be JDK related, though.

Steve.

Sweet! It works now....Thanks for the help.

alex im facing the same problem, how did you resolve it