28

Every time I build my project android studio build system download 'maven-metadata.xml'. As a result, it takes a very long time to build the project. Can anyone suggest me is there any way to fix this? Below is the picture of the problem.

enter image description here

  • Check your settings.xml and see what is the value for updatePolicy tag under repositories. The valid values are: always, daily (default), interval:X (where X is an integer in minutes) or never. – rootkonda Feb 29 '20 at 11:10
  • 2
    @rootkonda Would please tell me actually where settings.xm is located in android studio ? – Fozle Rabbi Shafi Feb 29 '20 at 11:26
  • it is a maven so not specific to android studio. The Maven installation directory: $M2_HOME/conf/settings. xml [global settings] or The user's home directory: ${user. home}/. m2/settings. xml [user settings] – rootkonda Feb 29 '20 at 11:28
  • thanks for the info. I'm checking it. – Fozle Rabbi Shafi Feb 29 '20 at 11:30
  • @FozleRabbiShafi Have you found the solution. Please share. – mukesh Apr 21 '20 at 05:27
  • 1
    @mukesh Not till now. I am not working on android for a few days. If I find, I will definitely share it. – Fozle Rabbi Shafi Apr 21 '20 at 20:22
  • Switch Charles Proxy off. – funkybro May 19 '20 at 14:25
  • is there any update about this issue? – aligur May 28 '20 at 20:36
  • Check your Maven repository definitions and check if they're working properly (they're accessible). If you have an invalid URL then Gradle will make a network call for each dependency you have while trying to resolve them, and it will do this in each configuration phase because it couldn't get the definitions previously. – Mustafa Berkay Mutlu Nov 16 '21 at 15:24

1 Answers1

8

In Gradle Tool window (View -> Tool Windows -> Gradle), activate Toggle Offline Mode.

Gradle toggle offline mode.

netpork
  • 552
  • 7
  • 20