Today I was going to make a new project in Android Studio. The Android Studio on my computer is updated to 3.0. When I was creating a new project and finished the procedure of the settings, the AS stuck at "Building Gradle Project info".
I have met this situation several times in AS 2.3.3, and I solved them by modifying the gradle distributionUrl. But this time, it doesn't work.
I hope someone can give me a hand. Thanks anyway!
Android Studio 3.0 or later is trying to download a new version of gradle automatically but it is taking too much time During download time network issue can stuck at building gradle project info it is the one Android Studio 3.0 was trying to download. Extract gradle-4.1-all.zip after extraction complete you can find folder name called gradle-4.1
Fixed it by going to Android Studio -> Preferences -> Gradle -> and ticking Offline work. Still have no idea what was wrong, but at least now it compiles. Edit: In new Android Studio Versions the path is File -> Other Settings -> Default Settings -> Build-Excecution-Deployment -> Gradle
Still have no idea what was wrong, but at least now it compiles. Edit: In new Android Studio Versions the path is File -> Other Settings -> Default Settings -> Build-Excecution-Deployment -> Gradle Show activity on this post.
Edit: In new Android Studio Versions the path is File -> Other Settings -> Default Settings -> Build-Excecution-Deployment -> Gradle Show activity on this post.
Because downloading Gradle takes a lot of time when your network situation is not so good, you have to download it by yourself.
My solution is:
1. Download a new version of gradle, such as gradle-4.3-all.zip, etc., and put the file in your AS Gradle location (Mac: go to the Application folder and open the package of AS, and put the new gradle in the Gradle folder. PS: If your new gradle version folder is not found, then you can create it on your own.Windows: like the previous two answers);
2. Disconnect your Wifi or LAN;
3. Open Android Studio 3.0 as usual;
4. DO NOT OPEN YOUR PROJECT IMMEDIATELY, TURN TO THE PREFERENCE PART FIRST;
5. GO TO THE GRADLE PART, DO THE SETTINGS AND SWITCH THE OFFLINE MODE ON;
6. Open the project you want to open;
7. Let AS to index the file and modify the gradle.properties when it is still indexing.
8. Turn on you Wifi or LAN, and AS will download the missing file.
ATTENTION: DO NOT MODIFY YOUR ANDROID MANIFEST OR OTHER FILES WHEN DOWNLOADING
9. Close AS and reopen the project. And everything will be fine. :-)
If you still stuck at "Building Gradle Project info", just redo all of these. Still not clear? Comment below.
AS 3.0 is trying to download a new version of gradle but it is taking too much time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With