I am getting the below error when executing gradle.bat
. I have checked the URL path and it looks fine. The URL is defined like this in the wrapper properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
Here's the error message:
Downloading https://services.gradle.org/distributions/gradle-2.1-bin.zip
Exception in thread "main" java.net.UnknownHostException: services.gradle.org at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
Could someone help me on this?
Go to "C:\Users\[yourusername]\.gradle\" folder (hidden folder - Go to folder option and enable show hidden files if folder is not showing up)
Look for file "gradle.properties" if DOES NOT (most likely this would be the case) exists, Create it under "C:\Users\[yourusername]\.gradle\
Copy and paste following code (More detail ... https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties ... look for "20.3 Accessing the web via proxy" for https and user/pwd variables)
systemProp.http.proxyHost=[PROXY SERVER] systemProp.http.proxyPort=[PROXY PORT]