Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

混淆后无法正常使用 #20

Closed
ryanxci opened this issue Aug 9, 2016 · 6 comments
Closed

混淆后无法正常使用 #20

ryanxci opened this issue Aug 9, 2016 · 6 comments

Comments

@ryanxci
Copy link

ryanxci commented Aug 9, 2016

No description provided.

@linheimx
Copy link

linheimx commented Aug 9, 2016

AndroidKnife/RxBus

-dontwarn com.hwangjr.rxbus.**
-keep class com.hwangjr.rxbus.** { ;}
-keepattributes *Annotation

-keepclassmembers class ** {
@com.hwangjr.rxbus.annotation.Subscribe public *;
@com.hwangjr.rxbus.annotation.Produce public *;
}

@ryanxci
Copy link
Author

ryanxci commented Aug 10, 2016

不行啊,我之前也是用这个,发现不行,最后只能手动把用到Rxbus的类全部忽略掉就可以了。

@xiaolongyuan
Copy link

+1

@hwangjr
Copy link
Member

hwangjr commented Aug 10, 2016

checkout this : RxBus/proguard-rules.pro at master · AndroidKnife/RxBus

另外,是否有对emum类型进行指定混淆?

-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    !static !transient <fields>;
    !private <fields>;
    !private <methods>;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

@paozhuanyinyu
Copy link

+1

@arindamxd
Copy link

# RxBus

-dontwarn com.hwangjr.rxbus.**
-keep class com.hwangjr.rxbus.** { *; }
-keep class com.hwangjr.rxbus.finder.** { *; }
-keep class com.hwangjr.rxbus.thread.EventThread { *; }
-keepattributes *Annotation
-keepclassmembers class ** {
    @com.hwangjr.rxbus.annotation.Subscribe public *;
    @com.hwangjr.rxbus.annotation.Produce public *;
    public void onEvent(**);
    public void onEventMainThread(**);
}
-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    !static !transient <fields>;
    !private <fields>;
    !private <methods>;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants