Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execution failed for task ':app:packageDebug' - Failed to read zip file

Tags:

Without any changes in my code, suddenly i get this error when I try to run my app:

  • What went wrong: Execution failed for task ':app:packageDebug'. com.android.builder.packaging.PackagerException: java.io.IOException: Failed to read zip file 'C:\Users\Eliran\AndroidStudioProjects\Forum\app\build\outputs\apk\app-debug.apk'.

I have no idea why its trying to read the apk as zip file.

  • If I restart Android Studio, I can run the app once and then It happens again.
like image 331
Eliran Tutia Avatar asked May 20 '16 12:05

Eliran Tutia


2 Answers

For me it helps (for now) when I Exit Android Studio, next I used Windows Task Manager (Ctrl + Shift + Esc) and kill process Java(TM) Platform SE binary and delete that file manually. After that I run Android Studio again, click on the Clean Project (there can be an error with app:clean, but you can run Android Studio again) and next click Make Project - after that of course Run 'app' button in Android Studio.

like image 72
y07k2 Avatar answered Sep 29 '22 20:09

y07k2


This issue has been reported to the development team: https://code.google.com/p/android/issues/detail?id=210693&thanks=210693&ts=1463824240

like image 25
Peter Avatar answered Sep 29 '22 20:09

Peter