Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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.

like image 481
Vijai Gunasekar Avatar asked May 16 '19 06:05

Vijai Gunasekar


People also ask

Where can I find Gradle-wrapper properties?

Method 2. Open gradle-wrapper. properties(go to Gradle > wrapper > gradle-wrapper. properties and manually change the distributionUrl property in the file.


2 Answers

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.

like image 177
miguelarc Avatar answered Oct 17 '22 01:10

miguelarc


I managed to fix this by updating the gradle version number in Project Structure in Android Studio 3.4.1

File -> Project Structure -> Project -> Gradle Version

like image 26
Amin Keshavarzian Avatar answered Oct 17 '22 02:10

Amin Keshavarzian