2

I have installed Android Studio today. I'm a newbie to Android development. I know that it has been asked several times, but my Android Studio is most updated as of now, so none of the solution seems to work. [AndroidStudio v3.6]

After the installation got over, I attempted to create an Empty Project. It opened the whole project as seen below,

enter image description here

After waiting for 7+ minutes (bottom-left), gradle is still not downloaded, and the activity_main.xml file keeps showing "Loading".

Solution 1 - Change the gradle location

I found this location to C:\Users\RAHUL.LAPTOP-DISIIAS2\.gradle\wrapper\dists\gradle-5.6.4-all\ankdp27end7byghfw1q2sw75f, but it contains two files - one is gradle-5.6.4-all.zip.part and other is gradle-5.6.4-all.zip.lck file.

Solution 2 - Invalidate and restart

Doesn't seem to work

Solution 3 - Change gradle settings to work in offline mode

The version I'm using doesn't have the option

enter image description here

How can I fix it?


Here is my gradle-wrapper.properties file:

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
vrintle
  • 5,501
  • 2
  • 16
  • 46
  • 1
    Hi Rahul. Please try to keep your questions succinct if you can. While readers appreciate you might be desperate, appeals to sympathy ("please help me", "I have been stuck for hours") are not relevant to the problem at hand, and readers do not want to be nagged. – halfer May 19 '20 at 16:18
  • 1
    @halfer, thanks for editing the post (shaka) – vrintle May 27 '20 at 03:04

1 Answers1

3

First, check if you are connected to services.gradle.org with ping command in Command Prompt. If you are connected, then change Proxy Settings in Android Studio to Use System Proxy. If it is downloading slowly again, your internet connection may be slow. Or you best fallow guidelines in this link : Gradle Download: Installing Manually

Then work in offline mode will appear in your settings.

Omid.N
  • 824
  • 9
  • 19
  • Thanks, your solution helped me the most. I did downloaded the file from `http://services.gradle.org/distributions/gradle-5.6.4-all.zip` (distributionUrl) manually. And, then placed it insode `C:\Users\RAHUL.LAPTOP-DISIIAS2\.gradle\wrapper\dists\gradle-5.6.4-all\ankdp27end7byghfw1q2sw75f`. Finally, I toggled gradle to work in offline mode by clicking gradle tab at top-right corner and then pressing `–//–` button. After that, the message changed from "downloading gradle" to "building gradle". It took almost 10-15 minutes for me to start with Android Studio from there. That's my gradle story! :) – vrintle May 27 '20 at 02:47
  • Afarin Afarin, Work as a charm – ucMedia Aug 30 '23 at 10:20