标签:proguard lang fail robot red ssm attribute read mem
未添加 EventBus的混淆,所以在Debug版本中不报错
在混淆文件“proguard-rules.pro”中添加:
1 ### eventbus
2 -keepattributes *Annotation*
3 -keepclassmembers class ** {
4 @org.greenrobot.eventbus.Subscribe <methods>;
5 }
6 -keep enum org.greenrobot.eventbus.ThreadMode { *; }
7
8 # Only required if you use AsyncExecutor
9 -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
10 <init>(java.lang.Throwable);
11 }
一般遇到类似debug时没问题,但是release时会报错,那多半就是在配置文件中找问题。
标签:proguard lang fail robot red ssm attribute read mem
原文地址:https://www.cnblogs.com/bbqopdd/p/12986497.html