androidgradlebuildbuild.gradle

The specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.6-all.zip' does not appear to contain a Gradle distribution


I have two projects. One project is working without any issues. It was downloaded from gitlab. The other project was downloaded from github. github project has this issue. I want to use default gradle distribution. I want to know what wrong I did. Using local gradle distribution builds the project. But i get other issue - Precondition class not found. This issue is not my question here. Also I dont know if the gradle (local distribution or default) is causing the issue. Those things aside. I just want to know why I am getting - The specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.6-all.zip' does not appear to contain a Gradle distribution.

My team mates are not having any problem. They are running the project without any issues. The project which is building correctly used gradle 4.10.1. This project uses 4.6.

The specified Gradle distribution 'https://services.gradle.org/distributions/gradle-4.6-all.zip' does not appear to contain a Gradle distribution.


Solution

  • I was able to solve this issue by upgrading the Gradle Version (not the Android Gradle Plugin Version). Go to Project Structure -> Project example here

    After this, Gradle re-downloaded all dependencies and the build was successful.