最近为了增加自己app的反编译难道,也为了减少压缩包体积,所以配置了混淆规则,这里坑还是蛮多的。大体上我是参考这篇博客:https://www.jianshu.com/p/b5b2a5dfaaf4并且直接复制了他的模板,对于而外的内容在这里记录 12 -dontwarn com.example.pc_0775.naugthyvideo.bean.**-keepnames class com.example.pc_0775.naugthyvideo.bean.** { *;} 对vatimio库避免混淆 1 -keep class io.vov.vitamio.** { *; } 对EventBus避免混淆 12345678910 -keepattributes *Annotation*-keepclassmembers class ** { @org.greenrobot.eventbus.Subscribe <methods>;}-keep enum org.greenrobot.eventbus.ThreadMode { *; }# Only required if you use AsyncExecutor-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { <init>(java.lang.Throwable);} 赞微海报分享
近期评论