错误:任务 ' 的执行失败:app:zipalignDebug'.>当我在 Android Studio 上运行我的应用程序时

错误:任务 ' 的执行失败:app:zipalignDebug'.>当我在 Android Studio 上运行我的应用程序时

问题描述:

我已经安装了 Debian 8 并且我没有问题地安装了 Android Studio,但是当我运行我的应用程序时,我在 Ubuntu 15.04 上安装了 Android Studio 时创建了这个错误:

I've installed Debian 8 and I installed Android Studio without problem, but when I run my application, created when I had Android Studio on Ubuntu 15.04, I've this error:

Error:Execution failed for task ':app:zipalignDebug'.
> Process 'command '/home/phate/Android/Sdk/build-tools/22.0.1/zipalign'' finished with non-zero exit value 127

这是什么错误?我该如何解决?

what kind of error is this? How I can resolve?

谢谢你,丹尼斯

我知道这个问题已经有 4 个月了,但我把答案放在这里是为了帮助其他人.在实际错误之前,我得到了这样的信息:

I know that this question is 4 months old, but I'm putting the answer here so that it may help someone else. Before the actual error, I got something like this:

加载共享库时出错:libz.so.1:无法打开共享对象文件:没有这样的文件或目录

error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

所以下面的命令对我有帮助,希望对你也有帮助.

So the following command helped me, I hope it helps you too.

sudo apt-get install lib32z1