4

This is the error I am getting:

Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'.
> Failed to delete temporary file C:\Users\Jesse\AppData\Local\Temp\jill-1473722184552-0.jack

Gradle syncs, but no projects can be built. Similar error in every project.

I'm really not sure what I should do here. I reinstalled Android Studio, but that didn't resolve anything.

McFiddlyWiddly
  • 547
  • 10
  • 29

3 Answers3

3

Might be a simple solution. Did you try File/Invalidate Caches / Restart... ?

DGarrett01
  • 391
  • 1
  • 2
  • 13
  • I did that, then tried building it again. This is the error I'm getting: `Error:Failed to complete Gradle execution. Cause: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html Please read the following process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap ` – McFiddlyWiddly Sep 12 '16 at 23:34
  • Some people have had success fixing this error by deleting the .gradle directory from their C:\Users\ directory. Worth a shot. – DGarrett01 Sep 12 '16 at 23:42
  • So I tried the invalidae caches/Restart a bunch of times and finally the gradle synced, but I get this error `Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'. > Failed to delete temporary file C:\Users\Jesse\AppData\Local\Temp\jill-1473723879706-0.jack` again. It's the same error after I delete the .gradle directory and build again. – McFiddlyWiddly Sep 12 '16 at 23:50
  • Just a shot in the dark, but did you try manually deleting that file? – DGarrett01 Sep 12 '16 at 23:57
  • Yeah. Cannot deal the file while it's in use. So I closed Android Studio, deleted the file, restarted it and built it again. Same issue. Having restarted my computer I'm now getting this error: – McFiddlyWiddly Sep 13 '16 at 00:11
  • ` `Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html Please read the following process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap ` – McFiddlyWiddly Sep 13 '16 at 00:11
  • I think I found the solution here... http://stackoverflow.com/a/31760855/1066112 Try method 2. – DGarrett01 Sep 13 '16 at 00:15
  • I think that may have resolved the heap size issue I was getting, but now I'm still getting the original error: `Error:Execution failed for task ':app:transformClassesWithPreJackRuntimeLibrariesForDebug'. > Failed to delete temporary file C:\Users\Jesse\AppData\Local\Temp\jill-1473726955609-0.jack` I'm trying a combination of all the possible solutions, though it doesn't look like any of them are resolving the issue. – McFiddlyWiddly Sep 13 '16 at 00:37
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/123192/discussion-between-dgarrett01-and-mcfiddlywiddly). – DGarrett01 Sep 13 '16 at 00:42
2

I solved this by ensuring I delete all android SDKs and Gradle and completely uninstalling everything related to Android Studio, and reinstalling everything again.

Somehow that worked.

McFiddlyWiddly
  • 547
  • 10
  • 29
2

This post suggested that this error could be caused by Avira Antivirus. Disabling the realtime protection actually allowed me to compile my project without the error. The other suggestions did not work for me.

Community
  • 1
  • 1
Ewout
  • 73
  • 8