任务':app:packageDebug'的Android执行失败

时间:2015-03-27 20:13:15

标签: android build gradle

我需要在webview中加载html文件,但是这个html包含很多脚本和其他资源。所以我把我的index.html和两个带有资源的文件夹放到我的资产文件夹中。现在,当我正在尝试构建我的项目时,我收到了这个错误:

:app:packageDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> Failed to add E:\Projects\PressurIce\app\build\intermediates\resources\resources-debug.ap_

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

第一个问题是:任何人都知道它是什么意思? 第二个问题是:我怎么能做到这一点:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

查看更多日志? THX。

更新1

使用--stacktrace运行提供更多信息:

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:packageDebug'.

Caused by: com.android.builder.packaging.PackagerException: Failed to add E:\Projects\PressurIce\app\build\intermediates\resources\resources-debug.ap_
    at com.android.builder.internal.packaging.Packager.addZipFile(Packager.java:422)
    at com.android.builder.internal.packaging.Packager.<init>(Packager.java:307)
    at com.android.builder.core.AndroidBuilder.packageApk(AndroidBuilder.java:1474)
    at com.android.builder.core.AndroidBuilder$packageApk$4.call(Unknown Source)
    at com.android.build.gradle.tasks.PackageApplication.doFullTaskAction(PackageApplication.groovy:97)
    ... 63 more
Caused by: java.util.zip.ZipException: invalid code lengths set
    at com.android.builder.signing.SignedJarBuilder.writeEntry(SignedJarBuilder.java:343)
    at com.android.builder.signing.SignedJarBuilder.writeZip(SignedJarBuilder.java:274)
    at com.android.builder.internal.packaging.Packager.addZipFile(Packager.java:416)
    ... 67 more

0 个答案:

没有答案