2

When I try to compile my application, I get the following error:

Gradle: 
FAILURE: Could not determine which tasks to execute.

* What went wrong:
Task 'assembleDebug' not found in root project 'Project'.

* Try:
Run gradle tasks to get a list of available tasks.


Could not execute build using Gradle installation 'C:\Users\[username]\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\gradle-1.6'.

Now I have been searching around on stackoverflow and other websites, and I am not the only person experiencing this issue. I tried this solution, aswell as restarting the program several times, and reinstalling Android Studio entirely. Still I'm getting the same error. I also tried manually deleting the "gradle-1.6" folder from the

'C:\Users\[username]\.gradle\wrapper\dists\gradle-1.6-bin\72srdo3a5eb3bic159kar72vok\'

folder, and putting the newest version of gradle into the folder manually.

Nothing helped. Still getting the error.

Community
  • 1
  • 1
Loyalar
  • 2,131
  • 4
  • 24
  • 44

3 Answers3

1

Doublecheck your gradle-installation to see if its properly set up.

  • Installation guide
  • And then run gradle build
  • If problem still presist, please provide us with your build.gradle files.
Community
  • 1
  • 1
Jan-Terje Sørensen
  • 14,468
  • 8
  • 37
  • 37
  • 1
    I actually tried this solution at the time, but it didn't help. Something else did, because it suddenly worked. – Loyalar Aug 22 '13 at 07:46
1

In my case, once, the JDK's location was not defined correctly. The error did not tell this, but fixing the JDK's location corrected the error.

Dexter
  • 1,710
  • 2
  • 17
  • 34
0

Re-adding my JDK location fixes this error for me. I open File->Project Structure and re-enter the JDK location by deleting the last directory in the path (Home) and then re-typing it. The path looks exactly the same as before, but the error goes away and I can build from Android Studio again.

Definitely a bug in Android Studio, it seems like the path is getting corrupted at some level.

Francesca Nannizzi
  • 1,695
  • 13
  • 18