Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Issue with proguard #53

Open
Open
@AlirezaIvaz

Description

@AlirezaIvaz

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:

<de.dlyt.yanndroid.oneui.view.NestedScrollView
    ...
    app:layout_behavior="@string/sesl_appbar_scrolling_view_behavior">
    ...
</de.dlyt.yanndroid.oneui.view.NestedScrollView>

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):

# 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 { *; }

If anything new is reported on this issue or other related pages, I will update this rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions