6

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Artefact
  • 95
  • 9

3 Answers3

3

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.

humazed
  • 74,687
  • 32
  • 99
  • 138
2

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:+
ChinLoong
  • 1,735
  • 24
  • 26
0

update maven gradle plugin in build.gradle using below

classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'

In gradle-wrapper.properties use this :

distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip

and update buildToolsVersion to 27.0.3

Tayyab Amin
  • 686
  • 10
  • 28