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

Viewed 9392

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?

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

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

Related