任务 ':app:packageDebug' 执行失败 - 无法读取 zip 文件 [英] Execution failed for task ':app:packageDebug' - Failed to read zip file
问题描述
我的代码没有任何更改,当我尝试运行我的应用程序时突然出现此错误:
Without any changes in my code, suddenly i get this error when I try to run my app:
- 出了什么问题:任务:app:packageDebug"的执行失败.com.android.builder.packaging.PackagerException: java.io.IOException: 无法读取 zip 文件 'C:\Users\Eliran\AndroidStudioProjects\Forum\app\build\outputs\apk\app-debug.apk'.莉>
我不知道为什么它试图将 apk 读取为 zip 文件.
I have no idea why its trying to read the apk as zip file.
- 如果我重新启动 Android Studio,我可以运行该应用一次,然后它再次发生.
推荐答案
对我来说,当我退出 Android Studio
时(目前)有帮助,接下来我使用了 Windows 任务管理器
(Ctrl + Shift + Esc) 并终止进程 Java(TM) Platform SE binary
并手动删除该文件.之后我再次运行 Android Studio,点击 Clean Project
(app:clean 可能会出错,但你可以再次运行 Android Studio)然后点击 Make Project
> - 当然之后 Run 'app'
按钮在 Android Studio 中.
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.
这篇关于任务 ':app:packageDebug' 执行失败 - 无法读取 zip 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!