studio中混淆代码时报错

Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForReleaseMinifyEnabled'.
> java.io.IOException: Please correct the above warnings first.

这个问题是在说你在混淆打包的时候有些类有可能找不着,所以会报错,和warning
解决的办法:
找到报warning的类都给他在你的proguard-rules.pro混淆器文件中
添加代码-dontwarn 包名+类名.**给取消掉warning就可以了,如果你不想那个类被混淆,那就添加代码:-keep class 包名+类名{*;}或者包名.**{*;}

-dontwarn org.dom4j.**
-dontwarn org.bouncycastle.**
-dontwarn org.apache.commons.logging.impl.**

-keep class com.ObjBlockCipherParam{ *; }
-keep class org.apache.commons.logging.impl.**{*;}

 

posted on 2016-10-08 00:57  若水无心  阅读(5924)  评论(0编辑  收藏  举报

导航