Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Crash using AndroidX with ProGuard enabled  #163

@Syex

Description

@Syex

@passsy already added a workaround for the BackstackReader with AndroidX for #149.

However, with ProGuard enabled I encountered the following issue:

Fatal Exception: java.lang.NoSuchMethodError: No virtual method isInBackStack()Z in class Landroidx/e/a/d; or its super classes (declaration of 'androidx.e.a.d' appears in /data/app/de.memorian.gzg-Mcx2ZyPo55208bHcZq319Q==/base.apk)
       at androidx.core.app.BackstackReader.isInBackStack(BackstackReader.java:23)
       at net.grandcentrix.thirtyinch.TiFragment.isFragmentInBackstack(TiFragment.java:235)
       at net.grandcentrix.thirtyinch.TiFragment.net.grandcentrix.thirtyinch.internal.TiFragmentDelegate.onDestroy_afterSuper(TiFragment.java:10204)
       at androidx.fragment.app.FragmentManagerImpl.androidx.fragment.app.Fragment.performDestroy(FragmentManager.java:16699)

Adding a ProGuard rule
-keep class androidx.** { *; }
resp.
-keep class androidx.fragment.app.Fragment { *; }

fixed the problem.

We could add this ProGuard rule to the library ProGuard rules to avoid it for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions