Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:Could not run build action using Gradle installation (gradle 2.4 ,android studio)

I just update Android Studio and I can't build any project, even newly created ones.

The error I got is:

Error:Could not run build action using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4.zip'.

what should I do?

like image 652
Kavir Avatar asked Oct 01 '15 12:10

Kavir


People also ask

How do I find my gradle version?

In Android Studio, go to File > Project Structure. Then select the "project" tab on the left. Your Gradle version will be displayed here.

How does gradle work?

Gradle is a build automation tool known for its flexibility to build software. A build automation tool is used to automate the creation of applications. The building process includes compiling, linking, and packaging the code. The process becomes more consistent with the help of build automation tools.


1 Answers

We have two famous way for this problem:

1- update the gradle:

step 1:

Get latest version supported by Android Studio from:

https://services.gradle.org/distributions

step 2:

Extract the gradle file and install to dists folder(gradle folder): default location is: C:\Users[username]\gradle\wrapper\dists

step 3:

Open Android Studio: File/Settings/Gradle/Service directory path: (Change to folder you set above) and Click ok.

Status on bottom should indicate it's busy & error should be fixed.

step 4:

restart Android Studio

2- Delete the .gradle folder:

default location is:

C:\Users[username]\gradle\wrapper\dists

after that open Android Studio and make a new project (might need to reastart).

like image 193
MajidAbdullahi Avatar answered Sep 19 '22 14:09

MajidAbdullahi