Android Studio: Unable to build app due to gradle distribution url error

Issue

I know this question has been asked before but I haven’t been able to fix the issue. I am running Android Studio version 3.1.4. I am trying to run an app that I cloned from a Github repository. But even before I try to run it, I get this error:

my-app: sync failed

Cause: https://downloads.gradle.org/distributions-snapshots/gradle-4.4-20171031235950+0000-all.zip

How do I fix this error? Thanks in advance.

Solution

You can check and change the distribution url in the properties file $rootDir/gradle/wrapper/gradle-wrapper.properties. See property distributionUrl.

Value should be something as follows (update the gradle version depending on your Android Studio version)

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

Answered By – M.Ricciuti

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published