Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.1 : updating gradle file cause android studio to freeze [duplicate]

Today I updated Android studio from 3.0.1 to 3.1.

I encountered a weird issue with Gradle. Each time I tried to edit a .gradle file, Android Studio freezes.

With some research, I saw that each time you edit a .gradle file, Android Studio send a request to search "http://search.maven.org/".

I'm behind a proxy at my work, everything is configured, everything worked properly before that update.

Is anyone encountered the same issue with this version or a older one?

like image 926
Artefact Avatar asked Mar 27 '18 15:03

Artefact


People also ask

Should I upgrade Gradle Android Studio?

Although the Android plugin is typically updated in lock-step with Android Studio, the plugin (and the rest of the Gradle system) can run independent of Android Studio and be updated separately. For the best performance, you should use the latest possible version of both Gradle and the plugin.

How do I resolve Gradle sync issues?

For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.


2 Answers

jcenter is having issues so when you get your project to build correctly the once enable offline-mode so AS don't have to connect to jcenter every gradle refresh.

see this question for more info.

like image 50
humazed Avatar answered Sep 27 '22 18:09

humazed


It is always good to check idea.log to see if there are any errors. On Mac OS X you can use "Help" > "Show Log in Finder" to show the idea.log file.

For my case, I found errors below, where my proxy was failing because I have just changed my password. After I updated my password, the freezing issue went away.

WARN - roid.inspections.LintIdeClient - Could not connect to maven central to look up the latest available version for com.google.android:flexbox:+
WARN - roid.inspections.LintIdeClient - Could not connect to maven central to look up the latest available version for com.google.android:flexbox:+
like image 28
ChinLoong Avatar answered Sep 27 '22 18:09

ChinLoong