keepclasseswithmembernames and keepclasseswithmembers difference

Some of the important attributes in proguard project properties include

-keep attribute
can be used with class, inteface enum etc

eg: -keep class com.smartandroidians.views.FloatingActionButtonBehavior which is not used in any java class and only used in xml files just like a string as


proguard remove this class because it feels like it is not used anywhere but it is a very important class  for the app rather floating button to function.

1) You can do something like this,
-keep class com.smartandroidians.views.FloatingActionButtonBehavior { *; }

or rather better approach is

2) -keepclasseswithmembernames class * {
    public (android.content.Context, android.util.AttributeSet);


Popular posts from this blog

Open Gallery and get the selected image in appplication

AlarmManager and Notification in Android

Dismiss or Cancel dialog by swipe gesture