Error:Unknown host services.gradle.org. You may need to adjust the proxy settings in Gradle

后端 未结 16 2284
有刺的猬
有刺的猬 2020-12-15 08:38

i have tried it many times but its giving me same error.how to set the proxy so that this error is solved

16条回答
  •  太阳男子
    2020-12-15 08:52

    In my case issue occurred after following:

    I selected proxy settings from Android Studio settings when I was working in a network behind a proxy. When I disconnected from that network and connected to home network which doesn't have a proxy, I removed the proxy settings from Android Studio, but gradle seemed to take the old proxy settings.

    The problem was that gradle had also saved the proxy settings in following file when I set proxy settings in Android Studio, but it hasn't got removed when I removed proxy settings from Android Studio.

    %HOME%\.gradle\gradle.properties
    

    When I removed the proxy settings from this file, gradle sync worked again.

提交回复
热议问题