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

Proguard Warnings #3

Closed
Nolanus opened this issue Jun 17, 2016 · 6 comments
Closed

Proguard Warnings #3

Nolanus opened this issue Jun 17, 2016 · 6 comments

Comments

@Nolanus
Copy link

Nolanus commented Jun 17, 2016

When creating a release apk of an app that uses RxBolts, the following proguard warnings appear:

Warning: rx.bolts.TaskObservable: can't find referenced class java.lang.invoke.MethodHandles$Lookup
Warning: rx.bolts.TaskObservable: can't find referenced class java.lang.invoke.MethodHandles
Warning: rx.bolts.TaskObservable$$Lambda$1: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning: rx.bolts.TaskObservable$$Lambda$2: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning: rx.bolts.TaskObservable$$Lambda$3: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning: rx.bolts.TaskObservable$$Lambda$4: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning: rx.bolts.TaskObservable$$Lambda$5: can't find referenced class java.lang.invoke.LambdaForm$Hidden
Warning: rx.bolts.TaskObservable$$Lambda$6: can't find referenced class java.lang.invoke.LambdaForm$Hidden
@vxhviet
Copy link

vxhviet commented Oct 3, 2016

Hi @yongjhih,

I'm very much facing this same issue when trying to use ProGuard on the latest rxParse:

    compile 'io.reactivex:rxandroid:1.2.1'
    compile 'io.reactivex:rxjava:1.2.0'
    compile 'com.infstory:rxparse:2.0.2'

The build throws this warning:

Warning:rx.bolts.TaskObservable: can't find referenced class java.lang.invoke.MethodHandles$Lookup
Warning:rx.bolts.TaskObservable: can't find referenced class java.lang.invoke.MethodHandles

I'm currently using these ProGuard rules for RxJava:

-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;
}

I'm not sure why your ProGuard config doesn't work but a quick search shows this StackOverflow question, maybe this is the problem?

@yongjhih
Copy link
Owner

yongjhih commented Oct 3, 2016

Sorry, I mistook adding proguard file:
7baa6db

@vxhviet
Copy link

vxhviet commented Oct 3, 2016

I can confirm this is the correct rule. I did add this into the main proguard file shortly after asking this question and it works perfectly. If you add this into the library, I can just use this instead.

Thanks a gain for your prompt reply.

@vxhviet
Copy link

vxhviet commented Oct 3, 2016

Sorry @yongjhih, I think you need to update RxParse to reference this commit as I don't use RxBolts directly and with version 2.0.2 of RxParse, this error still show up.

@yongjhih
Copy link
Owner

yongjhih commented Oct 3, 2016

#2

@yongjhih
Copy link
Owner

yongjhih commented Oct 4, 2016

@vxhviet, I've updated RxParse to 2.0.3 you can try.

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

3 participants