Android的multidex不支持使用ProGuard [英] Android multidex not supporting with proguard
问题描述
我更新了我所有的内置工具,supportlibrary和谷歌播放服务。 不过还是我收到以下错误:
I updated all my built tools, supportlibrary and google Play services. But still I am getting the following error:
错误:未能执行任务:应用程序:shrinkReleaseMultiDexComponents
Error:Execution failed for task ':app:shrinkReleaseMultiDexComponents'
java.io.IOException异常:输出罐子[应用程序\编译\中间体\多DEX \发布\ componentClasses.jar]必须输入罐子之后指定,否则将是空的。
java.io.IOException: The output jar [app\build\intermediates\multi-dex\release\componentClasses.jar] must be specified after an input jar, or it will be empty.
我可以通过设置 minifyEnabled
到假
来解决这个问题,但是这不是我想要的。有谁知道如何解决它?
I am able to fix this by setting minifyEnabled
to false
, but that is not what I want. Does anyone know how to fix it?
推荐答案
我终于能够生成APK与
Finally i able generate APK with
minifyEnabled为true
minifyEnabled to true
其实这个问题是一些重复的课程给予一定的警示作用,我没有注意到。
Actually the issue was some duplicate classes given some warning which i didn't noticed.
对于我来说,我补充
-dontwarn com.aphidmobile。**
-dontwarn com.aphidmobile.**
在proguard-rules.pro,同样的方式,你必须指定哪些库产生重复的警告。
in proguard-rules.pro, Same way you have to specify which libraries producing duplicate warning.
它的工作太棒了!
这篇关于Android的multidex不支持使用ProGuard的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!