Litho: Proguard failure

Created on 1 Jun 2018  路  2Comments  路  Source: facebook/litho

I have managed to solve most of the litho related proguard issues. But this one I could not find a solution to.

Warning: com.facebook.litho.TransitionManager$AnimationState: can't find referenced class com.facebook.litho.TransitionManager$ChangeType Warning: com.facebook.litho.TransitionManager$TransitionsAnimationBindingListener: can't find referenced class com.facebook.litho.TransitionManager$ChangeType Warning: com.facebook.litho.widget.RecyclerBinder$AsyncInsertOperation: can't find referenced class com.facebook.litho.widget.RecyclerBinder$Operation Warning: com.facebook.litho.widget.RecyclerBinder$AsyncMoveOperation: can't find referenced class com.facebook.litho.widget.RecyclerBinder$Operation Warning: com.facebook.litho.widget.RecyclerBinder$AsyncRemoveOperation: can't find referenced class com.facebook.litho.widget.RecyclerBinder$Operation Warning: com.facebook.litho.widget.RecyclerBinder$AsyncRemoveRangeOperation: can't find referenced class com.facebook.litho.widget.RecyclerBinder$Operation

Each one of these is due to internal interface ChangeType and Operation are IntDef interfaces in their respective classes.

Most helpful comment

Managed to build by adding following two lines in the proguard:
-dontwarn com.facebook.litho.TransitionManager$* -dontwarn com.facebook.litho.widget.RecyclerBinder$*

The application was crashing runtime due to unavailability of yogaLayout after proguard.
So, keeping yoga specifically solved this issue as well.

-keep class com.facebook.yoga.** {*;}

All 2 comments

Managed to build by adding following two lines in the proguard:
-dontwarn com.facebook.litho.TransitionManager$* -dontwarn com.facebook.litho.widget.RecyclerBinder$*

The application was crashing runtime due to unavailability of yogaLayout after proguard.
So, keeping yoga specifically solved this issue as well.

-keep class com.facebook.yoga.** {*;}

Should these be added to some official proguard documentation?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Junaid-Sakib picture Junaid-Sakib  路  7Comments

agrosner picture agrosner  路  8Comments

pavlospt picture pavlospt  路  5Comments

sjthn picture sjthn  路  4Comments

mmm111mmm picture mmm111mmm  路  6Comments