Rxjava: rxjava error Caused by java.lang.NoSuchFieldException: value

Created on 2 Dec 2015  路  6Comments  路  Source: ReactiveX/RxJava

Most helpful comment

Looks like this issue is resolved and can be closed.

// @chonamdoo you can use ProGuard rules for RxJava baked as aar https://github.com/artem-zinnatullin/RxJavaProGuardRules, I keep them updated with RxJava releases!

All 6 comments

Either wrong ProGuard ruleset or you run a particularly flawed Samsung Android version.

proguard setting

rxjava

-dontwarn rx.**
-keep class rx.schedulers.Schedulers {
public static ;
}
-keep class rx.schedulers.ImmediateScheduler {
public ;
}
-keep class rx.schedulers.TestScheduler {
public ;
}
-keep class rx.schedulers.Schedulers {
public static ** test();
}

Yup those are definitely wrong. Those are the rules with RxJava 1.0.16 (Unless they changed something with 1.0.17, those should also work)

-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;
}
-dontwarn sun.misc.Unsafe

@vanniktech thx T_T

Looks like this issue is resolved and can be closed.

// @chonamdoo you can use ProGuard rules for RxJava baked as aar https://github.com/artem-zinnatullin/RxJavaProGuardRules, I keep them updated with RxJava releases!

Closing. Please reopen it if you still have any question for proguard

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nltran picture nltran  路  4Comments

dsvoronin picture dsvoronin  路  4Comments

Jaap-van-Hengstum picture Jaap-van-Hengstum  路  3Comments

dimsuz picture dimsuz  路  4Comments

perlow picture perlow  路  3Comments