18

Have been trying to find some information about the rules needed for the new design support library to work passing proguard. I couldn't find any information about it.

Ended up using these rules:

-keep class android.support.design.widget.** { *; }
-keep interface android.support.design.widget.** { *; }
-dontwarn android.support.design.**

These rules seem to work but I'm not really sure if there are better rules or if it works with all the classes inside the design support library

Carlos Morera
  • 377
  • 4
  • 12

2 Answers2

19

I meet this error error while parsing android/support/design/R$anim.class.

End it with this code:

# support design
-dontwarn android.support.design.**
-keep class android.support.design.** { *; }
-keep interface android.support.design.** { *; }
-keep public class android.support.design.R$* { *; }
MewX
  • 4,232
  • 1
  • 29
  • 38
8

This should work:

-keep public class * extends android.support.design.widget.CoordinatorLayout$Behavior {
    public <init>(android.content.Context, android.util.AttributeSet);
}
Yuichi Araki
  • 3,438
  • 1
  • 19
  • 24