shaohui10086 / AdvancedLuban

An Advanced Compress Image Library for Android / 高效、简洁的图片压缩工具库
http://shaohui.me
Apache License 2.0
1.32k stars 192 forks source link

混淆问题 #23

Closed juemuren4449 closed 7 years ago

juemuren4449 commented 7 years ago

混淆之后报错Caused by: java.lang.NoSuchFieldException: No field producerIndex in class Lc/e/e/b/n; 在混淆规则里添加-keep class me.shaohui.advancedluban.*{;}仍然报错,请问怎么解决?谢谢!

shaohui10086 commented 7 years ago

不用配置混淆啊,我这边没有额外增加混淆规则也是可以运行的,你检查一下,是AdvancedLuban导致的的吗?

juemuren4449 commented 7 years ago

在luban那边看到的,添加下面的规则之后就不报错了,应该是rx的问题,还是谢谢了 -dontwarn sun.misc.* -keepclassmembers class rx.internal.util.unsafe.ArrayQueueField { long producerIndex; long consumerIndex; } -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef { rx.internal.util.atomic.LinkedQueueNode producerNode; } -keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef { rx.internal.util.atomic.LinkedQueueNode consumerNode; }

shaohui10086 commented 7 years ago

感谢反馈!

SheepYang1993 commented 7 years ago
-dontwarn sun.misc.**
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
 long producerIndex;
 long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
 rx.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
 rx.internal.util.atomic.LinkedQueueNode consumerNode;
}

混淆改了一下才成功, rx.internal.util.unsafe.ArrayQueueField* 改成 rx.internal.util.unsafe.*ArrayQueue*Field*