Android-studio
Android Studio⚑
Debug⚑
Building gradle stuck/frozen⚑
It's a weird trouble with internet, follow this instructions:
- 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);
- Disconnect your Wifi or LAN;
- Open Android Studio 3.0 as usual;
- DO NOT OPEN YOUR PROJECT IMMEDIATELY, TURN TO THE PREFERENCE PART FIRST;
- GO TO THE GRADLE PART, DO THE SETTINGS AND SWITCH THE OFFLINE MODE ON;
- Open the project you want to open;
- Let AS to index the file and modify the gradle.properties when it is still indexing.
- 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
- Close AS and reopen the project. And everything will be fine. :-)
Note: To switch offline mode on (Configure -> Preferences -> search for gradle -> then check the work offline radio button) Also when everything is done uncheck the offline radio button otherwise errors may occur.