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

Clarissa Cabbage
Clarissa Cabbage
2,038 Points

Gradle project sync failed

After pasting this code: compile 'com.squareup.okhttp:okhttp:2.3.0' into build.gradle (Module: app) I tried to sync the project with gradle files, and got the following warning: "gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly" and error: "Error:Cannot locate factory for objects of type DefaultGradleConnector, as ConnectorServiceRegistry has been closed."

I updated my android studio when I started this set of videos as Ben had a newer version and I wanted to be able to follow along, but I am not sure what is happening here. Any Ideas?

hey clarissa, im facing the same problem. im stuck now

Clarissa Cabbage
Clarissa Cabbage
2,038 Points

Can anyone help? I have been stuck on this for 5 days.

2 Answers

hy clarisa, which version of android are you using. I had the same problem and I upgraded my studio to 1.2 and my jdk to 8. I don't know what happened, but it worked for me, I can now syschronise

Clarissa Cabbage
Clarissa Cabbage
2,038 Points

I am running studio 1.0 and jdk 7. I will try that, thank you!

you are welcome, I hope it helps