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 Simple Android App Getting Started with Android Creating the Fun Facts Project

Tanuj Jairaj
Tanuj Jairaj
878 Points

Gradle sync failed: Protocol family unavailable-

I am using Windows 10, just downloaded android studio 2.3.3 and manually installed Gradle 4.0.2 from gradle.org (JVM 1.8). I have also checked the installation by running the gradle -v command in command prompt. My problem is that the project is not getting built. I get an error from Android studio which states - Gradle 'FunFacts' project refresh failed: Error- Protocol family unavailable. I have also tried switching off my firewall but it makes no difference. Due to this I do not see a screen similar to the last one that is shown in this video i.e. FunFactsActivity.java. In fact I do not see java under app folder

2 Answers

Hi there,

There's some useful tips in this thread. That's not an error I've ever come across.

Steve.

Tanuj Jairaj
Tanuj Jairaj
878 Points

Hi Steve, I have followed the thread. The settings on my vmoption file were already set as per this thread i.e. -Djava.net.preferIPv4Stack=true. Still unable to Android Studio working.

Do you have the JDK installed?

Here's another thread that has an alternative suggested solution. Every other thread talks about IPv4 which clearly isn't the issue.

It may be worth an uninstall and trying again.

Sorry I can't be of any use! I've not come across this problem before but hope to learn how to fix it should other students suffer the same problem.

Steve.