You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
Proguard/R8 inadvertently deletes some required classes that seem extra. So far I have only found a few classes for which this happens. These classes are used in xml code and will probably be deleted in Proguard/R8 for this reason.
This is not a bug in the library, and I will simply state what I found and the solution in this issue.
If you use the following code (of course not only that, there may be other codes as well) with Proguard/R8, your app will probably crash:
Note: Because Proguard/R8 is disabled in debug mode, your app may work fine but will crash in release mode.
To avoid deleting required classes so as not to damage the app, you must add these lines to the app/proguard-rules.pro file (or in proguard-rules.pro file for each module in which you use this library):
It might be necessary to whitelist more components starting 2.3.0 since they also cause crashes with 'Class not found' errors. This is what my app uses.
# One UI Design Library (de.dlyt.yanndroid.oneui)
-keep class de.dlyt.yanndroid.oneui.** { *; }
-keep class androidx.appcompat.widget.Sesl** { *; }
-keep class android.view.WindowInsetsController { *; }
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
documentationImprovements or additions to documentation
Proguard/R8 inadvertently deletes some required classes that seem extra. So far I have only found a few classes for which this happens. These classes are used in xml code and will probably be deleted in Proguard/R8 for this reason.
This is not a bug in the library, and I will simply state what I found and the solution in this issue.
If you use the following code (of course not only that, there may be other codes as well) with Proguard/R8, your app will probably crash:
To avoid deleting required classes so as not to damage the app, you must add these lines to the
app/proguard-rules.pro
file (or inproguard-rules.pro
file for each module in which you use this library):If anything new is reported on this issue or other related pages, I will update this rules.
The text was updated successfully, but these errors were encountered: