使用EventBus 3徙融,添加混淆時需要添加如下配置
#EventBus
-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);
}
由于訪問官網(wǎng)是需要翻墻,因此做下記錄
http://greenrobot.org/eventbus/documentation/proguard/