2

So I came across this problem when I am clicking the play button on Android Studio in order to deploy to my device and I cannot figure out how to solve this. Please see print shot attached: Gradle Message

I did take certain actions :

  1. Rebuild Project (Builds with no problem)
  2. Clean Project , (In this case it fails to clean the project)
  3. Ran gradlew clean on terminal (failed to clean) with message could not execute clean for ':app:clean'
  4. Make Project (no results)
  5. Invalidated Caches and Restarted.

None of those actions have taken effect!

Any ideas and solutions are welcome! Thanks in advance!

AndroidKrayze
  • 349
  • 2
  • 5
  • 21

1 Answers1

1

I ran into problems similar to this after forcefully ending some builds which got my caches corrupted somehow.

I would also try to restart the computer and clean the Temp folder after that.

If a full restart is overkill, exit Android Studio, run a gradlew --stop to kill all the gradle daemons, and/or kill every java process. Then try to clear the Temp directory

If you're still in a weird state, delete the .gradle folder in your project folder (N.B .gradle, not gradle folder) and as a last resort also try to clear the contents of C:\Users\manos\.gradle\

Mircea Nistor
  • 3,145
  • 1
  • 26
  • 32
  • 2
    Hello Mircea, thank you for your comment! Luckily Yesterday I found the solution to this! The problem was my Antivirus, which was blocking Jack from performing system operations! I could not believe my eyes. So you either deactivate your antivirus (on your own risk), or whitelist Jack components! UNBELIEVABLE!!!!!!!!!!!!! – AndroidKrayze May 05 '17 at 15:56
  • maybe we should file a bug to the Antivirus company. What AV are you using? – Mircea Nistor May 05 '17 at 16:35
  • 1
    Also, according to http://tools.android.com/tech-docs/jackandjill the jack toolchain is deprecated. Out of curiosity, is there something special you still use it for? – Mircea Nistor May 05 '17 at 16:38
  • 1
    Yes there is a specific reason! I use signal-r machine for Android. That library was kind of broken for Automatic Transport so I fixed it and build the project! Now that runs only with Java 8 and Jack. Hence the reason am using Jack. – AndroidKrayze May 08 '17 at 08:17
  • Regarding the Antivirus, I have seen a couple that do it e.g : ByteFence and also Avira from this link http://stackoverflow.com/questions/39851050/android-studio-2-2-and-jack-are-getting-blocked-by-avira-antivirus. In my case is ByteFence! – AndroidKrayze May 08 '17 at 08:19