Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stuck on Gradle: Download maven-metadata.xml in android studio

After adding volley dependency and press sync. I canceled syncing the dependency and after that when I reopen the project I get this stuck to build the project. I also click on clean the project and invalid cache and restart buttons. but It can not be changed. How can I fix it?

like image 905
Hasan Cheraghi Avatar asked Jul 24 '20 14:07

Hasan Cheraghi


2 Answers

I had enabled https proxy, through the Android Studio settings dialog. And when I needed to use it on another network, I was not able to disable it through the same settings dialog.

So, I removed the proxy configuration lines directly in the Global Gradle Properties file (<USER_HOME>\.gradle\gradle.properties) and my problem was solved.

gradle.properties
...
# systemProp.http.proxyHost=
# systemProp.http.proxyPort=80
# systemProp.https.proxyHost=
# systemProp.https.proxyPort=80

As explained here

like image 112
Felipe Ferreira Avatar answered Sep 19 '22 13:09

Felipe Ferreira


I fixed by deleting the <USER_HOME>\.gradle folder and restart AndroidStudio

like image 38
Sally Avatar answered Sep 21 '22 13:09

Sally