Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio download maven metadata every time during build [duplicate]

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

like image 640
Fozle Rabbi Shafi Avatar asked Feb 29 '20 09:02

Fozle Rabbi Shafi


People also ask

Why is Maven downloading the Maven metadata XML every time?

Maven does this because your dependency is in a SNAPSHOT version and maven has no way to detect any changes made to that snapshot version in the repository. Release your artifact and change the version in pom. xml to that version and maven will no longer fetch the metadata file.

What is Maven metadata XML?

The file at https://repo1.maven.org/maven2/com/octopus/randomquotes/maven-metadata.xml is created when a Maven artifact is published. It lists various details about the artifacts that have been published, like version number and the dates when the artifact was last updated.


1 Answers

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

Gradle toggle offline mode.

like image 127
netpork Avatar answered Oct 16 '22 17:10

netpork