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.

No preview found in a minified and shrinked build (Proguard)

See original GitHub issue

👋 Thanks guys for the amazing work on Showkase, we have implemented it in our apps: we use it to quickly see if we missed the implementation of our components.

Problem

When we launch the showkase activity, it does not find any preview.

Capture d’écran 2021-08-17 à 17 33 12

Expected behavior

When we launch the showkase activity, it finds all composables annotated with @Preview.

Hypothesis

It is ok in debug but ko in release. Do you think we should specify something in proguard settings ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
vinaygabacommented, Aug 18, 2021

Sounds reasonable! I’ll take a look at share the keep rules you might need!

1reaction
vinaygabacommented, Sep 19, 2021

Hey! I had played around with the proguard configuration a bit and went down a rabbit hole for minimizing the footprint of this library. I was also experimenting with using debugImplementation and updating some of the documentation to reflect with some new guidance for use cases where Showkase is only used in debug mode. As far as release builds go, I haven’t profiled release build yet and suspect that it’s probably going to be the rule that you have in your previous comment itself. Once more people can confirm it and I also spend some time experimenting with it, I can potentially ship this library with some release proguard rules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Shrink, obfuscate, and optimize your app - Android Developers
Learn how to shrink code in your release build to remove unused code and resources.
Read more >
What does 'minifyEnabled=true' do when all configuration ...
Everything is working fine except if I enable minification in my app/build.gradle via minifyEnabled true the app instantly crashes on startup ...
Read more >
Android MinifyEnabled, Obfuscation and Shrink | by Burak iren
Specifies not to shrink the input. By default, ProGuard shrinks the code: it removes all unused classes and class members. It only keeps...
Read more >
Configuring ProGuard | CodePath Android Cliffnotes
ProGuard is a tool to help minify, obfuscate, and optimize your code. It is not only especially useful for reducing the overall size...
Read more >
Debugging Proguard configuration issues
First of all, we need to be sure that the issue we have is because of some misconfiguration of the release build. To...
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