Android Studio Stuck at Gradle Download on create new project

后端 未结 17 1610
盖世英雄少女心
盖世英雄少女心 2020-12-02 04:01

I have installed the new Android Studio. Everything was working fine but when I try to create a new project it gets stuck at downloading Gradle

相关标签:
17条回答
  • 2020-12-02 04:41

    It is not stuck, it will take some time normally 5-7 mins , it also depends upon internet connection, so wait for some time. It will take time only for first launch.

    Update: Check the latest log file in your C:\Users\<User>\.gradle\daemon\x.y folder to see what it's downloading.

    0 讨论(0)
  • 2020-12-02 04:42

    If you're using OS X, and it continues to hang indefinitely, I'd recommend shutting down Android Studio (may have to force kill), then going to your ~/.gradle directory on the console. You'll see a wrapper/dists directory there and whatever version of gradle AS is trying to download. Check the timestamp of the download underneath the randomly named subdirectory. If you see that it is never changing, most likely your download was interrupted and AS wasn't able to restart it properly and will not unless you delete everything below the dists directory and start over.

    So, with AS shutdown delete everything below ~/.gradle/wrapper/dists and then try again with a new project in AS. You can check the progress of the gradle download file (it will end in .part) to make sure that it's growing. Give it plenty of time as it IS a large file.

    That's what finally worked for me.

    0 讨论(0)
  • 2020-12-02 04:42

    For Windows Users

    Use your Network Resource Monitor

    Open Task Manager [Ctrl+Shift+Esc]

    Performance Tab

    Open Resource Monitor (From the bottom)

    First i decided to wait after reading answers here. But how long..? How to make sure it will finish.? They should have provided percentage of download, but they have not. So to know some kind of progress is going on, open this network resource monitor, it will show you some kind of download is going on for the Studio64.exe. IF not (if it shows 0B/Sec), then either network is not available or the application is not responding.

    0 讨论(0)
  • 2020-12-02 04:42

    I had fixed this problem by removing the .gradle folder

    in windows: C:\Users{Logged in User}.gradle

    0 讨论(0)
  • 2020-12-02 04:43

    Invalidate Caches and Restart

    It worked for me.

    0 讨论(0)
  • 2020-12-02 04:44

    Yes, There is.

    1. Create a new project and you should Shutdown The Android Studio Application.(Because it takes a long time for you).
    2. Goto C:\Users\{Logged in User}\.gradle folder
    3. There is a folder there that show you which version of gradle Android Studio requires (e.g. gradle-1.8-bin)
    4. Download this version from internet (e.g. gradle-1.8-bin.zip).
    5. Goto C:\Users\{Logged in User}\.gradle\wrapper\dists\gradle-1.8-bin
    6. There is a folder here that its name is like a GUID.
    7. You should just copy the zip file that you've already downloaded from internet into this folder.
    8. Execute Android Studio and create a new project.
    0 讨论(0)
提交回复
热议问题