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 trialAdrian Moat
176 PointsAndroid studio is stuck on Gradle: Initalise build. Running as administrator and I've let it through my firewall.
I let it go overnight just incase it was taking a while but it was still on Gradle: Initalise build.
5 Answers
Steven Byrne
4,120 PointsAre you able to run Gradle (gradlew) commands via the command line? You mentioned letting it through your firewall -- does that mean that normally things like Gradle (and Studio) would not have direct access to the net from your environment? Did you open the firewall hole before or after you started the stuck operation?
Steven Byrne
4,120 PointsBut, the question is: independent of Android Studio, are you able to use ./gradlew from a terminal window at all? That is, do you have sufficient network access, JAVA_HOME set, and related environmental configuration to ensure that the self-loading Gradle system will work at all? Or is your environment so jacked that even this won't work? I don't believe you've said what OS you're on, which in these cases is important to disclose (both type, and version).
For example, if you are on Linux, the hang could be caused by some operation trying to retrieve random numbers from /dev/random and the entropy gathering daemon is out of entropy, causing blocking until more entropy is produced. But, without knowing the OS, it's harder to isolate what might be the cause.
What would happen if you simply killed Android Studio and tried starting again? It's not likely that it will get "unstuck" on its own at this point...
Adrian Moat
176 PointsI'm on Windows 8.1 and I have tried restarting it several times. The internet access is fine. I have set JAVA_HOME
Steven Byrne
4,120 PointsHmmm....have any virus scanners that might be interfering with this working? Does Windows 8.1 have the annoying property that older versions of Windows had where some important (and modal) alert dialogs don't pop up over other windows so you don't know they are there?
Since Android Studio is basically IntelliJ Idea with some augmentation, what would happen if you installed the community version of Idea with the Gradle plugin and see if you can spin up a simple Java project that way, just to verify that your environment isn't somehow preventing any IJ from working properly?
Adrian Moat
176 PointsI don't have any virus scanners and I've never coded before so I have no idea how to do the second paragraph, however would this have changed anything? In order not to go over my internet limit and a friend and I are doing this together I got my friend to download it and I copied all the files of Android studio over to my computer, would that change anything?
Steven Byrne
4,120 PointsAh. It just might change things, depending on what files you copied over and whether they had been used for installation on your friend's system first. Having download limits also complicates things a bit (is it possible that you're hitting this download limit anyway, and that's causing the hang?).
Steven Byrne
4,120 PointsGradle (well, really Maven) will download any dependencies it needs, which for Studio, could be considerable. Is it possible that where these dependencies are trying to go in your file system is somehow write-protected or otherwise preventing the retrieval of the necessary files?
What about my earlier question about ./gradlew from the command line? Tried that yet as a way see if the problem is specific to Studio, or is endemic to your environment?
Adrian Moat
176 PointsBy command line do you mean do that in command prompt, cause if so cmd has been blocked by my administrator so I can't use it.
Steven Byrne
4,120 PointsAh. That sort of administrative level restriction is important to disclose when describing a problem as it materially affects the set of potential causative factors and therefore the course of diagnosis. . This likely is a problem you will need your local administrators to help you with.
Adrian Moat
176 Pointsok thx I'll talkto them about it
Adrian Moat
176 PointsAdrian Moat
176 PointsI can't use Android Studio until Gradle finishes, Also I Let them through my firewall so they could access the internet, I did this before I started the operation