1
votes

My gradle config is :

 minifyEnabled true
 shrinkResources true
 proguardFile 'proguard-rules.pro'

I want to minify my app's size. Thus I use proguard to achive this. However, I don`t want to change my class names and method names. Therefore, I try to turn off all Android ProGuard features except obfuscation.

And my proguard-rules.pro is as follows: -dontshrink -dontusemixedcaseclassnames -dontpreverify -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* -optimizationpasses 5 However, -dontshrink seems has no effect. Thus, I -keep many classes and -donwarn them as well. But there still problems, such as :

Error:Execution failed for task ':app:proguardDefaultConfigDebug'.

Can't find common super class of [org/luaj/vm2/script/LuaScriptEngine$LuajCompiledScript] (with 1 known super classes) and [java/lang/Object] (with 1 known super classes)

and :

warning: a.a.a.a.a can't find referenced calss org.apache.thrift.TEnum

1
Could you make your question a bit more clear? - anthonymonori

1 Answers

0
votes

It seems that android Dalvik has its own optimize rules. Therefore, in the android sdk, -dontoptimze is advised. Thus, my temp solution is to disable this now.