错误:任务':app:shrinkReleaseMultiDexComponents'执行失败

时间:2015-11-03 00:09:57

标签: java android android-gradle multidex

我试图生成一个APK以便在Google商店中发布,但我收到以下错误:

Error:Execution failed for task
':app:shrinkReleaseMultiDexComponents'. java.io.IOException: The output jar
[/home/nome/Projects/app-android/app/_app/build/intermediates/multi-dex/release/componentClasses.jar]
must be specified after an input jar, or it will be empty.

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

这看起来与Progaurd有关。

根据以下链接,看起来某些Progaurd配置以及启用了multidex可能会返回此错误。你能尝试禁用Progaurd吗?

Android Build with Gradle and ProGuard : "The output jar must be specified after an input jar, or it will be empty"

Android multidex not supporting with proguard

https://groups.google.com/forum/#!topic/adt-dev/qU0Me1_2HF8