[Solved] Android Studio 2.2 Stuck at Building Gradle Project Info on importing existing project

I am using Android studio 2.2 on windows 10.

I am trying to import an existing android project. The problem that it took forever and still showing the message

Building ‘ProjecTName’ Graedle project info

after that android studio is totally getting stuck and i kill it from the task manager !

I tried the available options on Android Studio list:

  1. Open an existing Android Studio Project

  2. Import Project (Eclipse ADT, Gradle, etc.)


Enquirer: MBH


Solution #1:

There is downloading of Gradle going on at the background. Just wait for it to finish.

Respondent: MBH

Solution #2:

Just Remove Gradle files from your project folder and retry.

Hope this will help.

Respondent: Ciado

Solution #3:

I also had the problem.

I downloaded the gradle 3.5 binary distribution zip file, deleted the gradle folder from my project, then went to settings of Android Studio, checked “Offline work”, used “Use local gradle distribution” and set the path of unzipped gradle folder
on the “Gradle home” and “Service directory path” text fields.

Then I tried to open the project with Android Studio 2.3.

Then a message is shown and I pressed cancel to manually configure the gradle, then I located the unzipped gradle folder again. This solved my problem.

Respondent: lRadha

Solution #4:

Try the following :

1> Try Removing(Deleting) the gradle files from the project folder and then re-try.

2> Try to go into the android studio and then Files>Invalidate Caches/Restart and then try.

3> If the above two don’t work do check the gradle,android Studio versions and see if those need updating.

4> Above 3 usually work for me , if it still persists, then you need to check the dependencies for the project. Also try importing some other project and if the same issue occurs, try a new installation of a STABLE version of the android studio.

Respondent: Rifat Haque Amit

Solution #5:

Try to remove C:UsersUser.gradle

Respondent: dummystreamer

Solution #6:

I had deleted all gradle folder and copied it from another project and pasted it, this worked for me

Respondent: Oguzhan Cevik

Solution #7:

The above answers didn’t work for me well.

I have several projects with different gradle versions, and whenever I tried to open a project the Android Studio started downloading its gradle in the background.

So, things to do before importing old projects to new Android Studio / Gradle.

  1. In file ‘build.gradle’ replace old line with “classpath ‘com.android.tools.build:gradle:2.3.3′”
    (Assuming 2.3.3 is the latest. You can check this in your newly/recently created project)
  2. In file ‘gradle/wrapper/gradle-wrapper.properties’ replace old line with ‘distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip’
    (Assuming 3.3 is the latest. You can check this in your newly/recently created project)

Now when you’ll import, it wont download other gradle version.

I did find-replace for the above lines in my whole directory containing all my old projects, using Notepad++.

Respondent: MBH

Solution #8:

Actually the real Problem is that the studio is downloading gradle files throught internet and sometimes it is not able to do so, then it stucks but we can manually fix it through-

Download Gradle Files according to your android Studios version.

You can download gradle files through-https://services.gradle.org/distributions/

See your Gradle vesrion through-https://developer.android.com/studio/releases/gradle-plugin.html in the Update Gradle area.

Download the Gradle and paste it into- c:/Users/username/local/.gradle

and this is It!!!

Respondent: M. Usman Khan

Solution #9:

I found that my gradle files had the gradle version set 2.1.0. So I opened the files in wordpad and first changed that to 3.3 And then it worked fine for me.

And in the gradel-wrapper.properties:
From distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip
To distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip
Hope that will solve the problem

Respondent: Manuj

Solution #10:

This worked for me.. Will work for you for sure.

step 1: Delete “only” the Gradle “folder” from your project folder.

step 2: Import your project from Android Studio & a dialog box will appear “press
Ok to use…, or Cancel to… “. Press “Cancel” & locate the path where you have downloaded the latest Gradle File (C:/Gradle/gradle-3.5 ,in my case).

Step 3: it will give an error saying that “no cache version for….”. So now check which version of com.android.tools.build:gradle: you have.. so check the path “C:Program FilesAndroidAndroid Studiogradlem2repositorycomandroid oolsuildgradle” and select the latest version (2.3.2 in my case). So now, go to Gradle Scripts-> build.gradle(android) in Android Studio and change the dependencie’s classpath to (classpath ‘com.android.tools.build:gradle:2.3.2’)in my case

step 4: Click on “try again”. Then it’ll ask for upgrading tools, upgrade it by clicking on it & then you’re done..

Congrats, your Project is successfully built..

And yeah make sure that In Setting-> Build,Exec…->Gradle-> “check mark on Use local gradle distribution & offline work & Gradle home: C:/Gradle/gradle-3.5 & Service directory path: C:/Gradle/gradle-3.5 (in my case).

Respondent: K.A. Siddiqui

Solution #11:

Deleting temp and temp% worked for me!

Respondent: Vivek Thakkar

Solution #12:

Download manually gradle-3.3-all.zip

and extract into /Users/[yourUsername]/.gradle/wrapper/dists/gradle-3.3-all/55gk2rcmfc6p2dg9u9ohc3hw9/

Respondent: Nishchay Zacariah

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.