Issue
I'm getting the below error when I have imported a gradle project and tried refreshing it. I'm new to gradle and using gradle wrapper. also, the gradle distribution exists in the repository.
Could not fetch model of type 'BuildEnvironment' using Gradle distribution 'href="http://repository.xyz.com:8080/artifactory/gradle-distributions/gradle-4.8.1-all.zip" rel="nofollow noreferrer">http://repository.xyz.com:8080/artifactory/gradle-distributions/gradle-4.8.1-all.zip'. The specified Gradle distribution 'http://repository.paychex.com:8081/artifactory/gradle-distributions/gradle-4.8.1-all.zip' does not exist. http://repository.xyz.com:8080/artifactory/gradle-distributions/gradle-4.8.1-all.zip
Solution
open gradle/wrapper/gradle-wrapper.properties
and set a proper distributionUrl
there:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip
Answered By - Martin Zeitler
Answer Checked By - Timothy Miller (JavaFixing Admin)