anurag1203 / android-dateslider

Automatically exported from code.google.com/p/android-dateslider
0 stars 0 forks source link

DateSlider will crash using proguard #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use DateSlider Demo
2. Export Demo with proguard enabled

What is the expected output? What do you see instead?
When the dialog should open, the app will crash

Using eclipse Indigo
Android SDK rev 12

Original issue reported on code.google.com by jos.zonn...@gmail.com on 20 Sep 2011 at 11:15

GoogleCodeExporter commented 8 years ago
I totally have pro guard so far! I will deal with it soon!

Original comment by daniel.b...@gmail.com on 7 Nov 2011 at 11:45

GoogleCodeExporter commented 8 years ago
Never mind, I figured it out myself
The following proguard.cfg rules  will solve the issue

-keep public class * extends 
com.googlecode.android.widgets.DateSlider.labeler.YearLabeler
-keepclassmembers class 
com.googlecode.android.widgets.DateSlider.labeler.YearLabeler{
     public <init>(java.lang.String);
}
-keep public class * extends 
com.googlecode.android.widgets.DateSlider.labeler.MonthLabeler
-keepclassmembers class 
com.googlecode.android.widgets.DateSlider.labeler.MonthLabeler{
    public <init>(java.lang.String);
}
-keep public class * extends 
com.googlecode.android.widgets.DateSlider.labeler.Labeler
-keepclassmembers class 
com.googlecode.android.widgets.DateSlider.labeler.Labeler{
    public <init>(int, int);
}

Original comment by jos.zonn...@gmail.com on 8 Nov 2011 at 7:08