Disable Proguard

Disable Proguard


is there a way to disable Proguard during the build. I am receiving errors and therefore the build gets aborted.
First I would like to finish my project migration before digging into Proguard issues.

Kind Regards

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Dear Sven,

You can customize ProGuard by creating a proguard.append.cfg file in your MOE module's directory and adding ProGuard options there. However I wouldn't recommend keeping all classes (with -keep class ** { *; } ), because it will keep too many classes which has significant size and build time penalties. I would recommend that you keel all of your own classes (maybe even some dependencies) and let ProGuard trim some of the classes.

To keep every class and interface in a package:

-keep class com.my.package.** { *; }

Best Regards,

Dear Kristof,

I created a proguard.append.cfg file with this content:

-dontnote javax.el.**

and I received the attached output from pro guard. I quit using pro guard on android when there were some crazy runtime errors and can happily live with the fact that people can disassemble the code - if they have the time.

Now in MOE it looks like I must use Proguard and it is giving me a hell of output. also the output itself.

Could you please let me know what to do and point me to the right direction ? I don't even know what causes the termination of the build. There are several warnings. Do warning cause the terminations ?

Thanks and kind regards Sven


Downloadtext/plain outputproguard.txt287.85 KB

Dear Sven,

It seems like ProGuard failed to write the proguarded.jar file onto disk because while writing the output, the BeanELResolver.class would have been written multiple times (Duplicate zip entry).

Caused by: java.io.IOException: Duplicate zip entry [el-api-2.2.jar:javax/el/BeanELResolver.class]

Try to figure out which of these inputs contains the javax/el/BeanELResolver.class file:

Reading program jar [/Users/sven/AndroidStudioProjects/Restaurant/mahlzeitIOS/libs/joda-time-2.7.jar] (filtered)
Reading program directory [/Users/sven/AndroidStudioProjects/Restaurant/mahlzeitIOS/build/classes/main] (filtered)
Reading program jar [/Users/sven/AndroidStudioProjects/Restaurant/mahlzeitIOS/libs/javaee-api-6.0.jar] (filtered)
Reading program jar [/Users/sven/AndroidStudioProjects/Restaurant/mahlzeitIOS/libs/jackson-core-2.2.3.jar] (filtered)
Reading program jar [/Users/sven/AndroidStudioProjects/Restaurant/mahlzeitIOS/libs/jackson-annotations-2.2.3.jar] (filtered)
Reading program jar [/Users/sven/AndroidStudioProjects/Restaurant/mahlzeitIOS/libs/jackson-databind-2.2.3.jar] (filtered)
Reading program jar [/Users/sven/AndroidStudioProjects/Restaurant/mahlzeitIOS/libs/el-api-2.2.jar] (filtered)

Most likely el-api-2.2.jar and javaee-api-6.0.jar.

This fix for this error is to simply remove the el-api-2.2.jar.

Best Regards,

Leave a Comment

Please sign in to add a comment. Not a member? Join today