question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add visibility of proguard rules to README or wiki please

See original GitHub issue

Are there examples of proguard rules that will work with minifyEnabled set to true? I’m currently getting:

 java.lang.NoSuchMethodError: No virtual method doOnSubscribe(Lrx/functions/Action0;)Lrx/Observable

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:28 (14 by maintainers)

github_iconTop GitHub Comments

16reactions
desseimcommented, Nov 20, 2015

@jaredsburrows You’re right, thanks for noticing. Seems like a dumb copy-paste error… Anyway, the proper settings should be:

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

On my code base (and yours too apparently), BaseLinkedQueueProducerNodeRef and BaseLinkedQueueConsumerNodeRef classes altogether were stripped away by Proguard anyway so that no problem arose. For anyone whose code ended up BaseLinkedQueue though, it would have probably thrown at runtime.

2reactions
rzsomborcommented, Jun 13, 2016

@artem-zinnatullin Oh yes, forgot to add that - only switching Unsafe off on these problematic device - OS combinations.

@eranpolo Thanks the extra info. I’m still trying to get my hands on an affected device to get to the bottom of this.

Edit: for reference, our current naive workaround for the Samsung-issue:

if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP && "samsung".equalsIgnoreCase(Build.MANUFACTURER)) {
    System.setProperty("rx.unsafe-disable", "True");
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Diff - refs/tags/android-cts-4.2_r2^! - platform/external/proguard
@@ -1,6 +1,6 @@ <!-- This Ant build file illustrates how to process applications, by including a ProGuard-style configuration file. - Usage: ant...
Read more >
A small, asynchronous IoC library for Android that might be ...
1. All classes that need to be injected must be annotated with @Component. · 2. Instead of adding @Component annotation to the interface,...
Read more >
flutter_local_notifications 9.1.0 | Flutter Package - Pub.dev
A cross platform plugin for displaying and scheduling local notifications for Flutter applications with the ability to customise for each platform.
Read more >
c1 · d09c2e044b - Gitea: Git with a cup of tea
Please provide additional information about the bug, if any. --> ... android/README.md View File ... +# Add project specific ProGuard rules here.
Read more >
NextFaze / dev-fun Download - JitPack
Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url 'https://jitpack.io' } } }....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found