请帮帮我。
我试着理解,但所有的例子都非常不同。
找不到标准配置。
我是否需要额外的静态方法?
为什么我必须描述额外的类被序列化?
我有1个Activity,几个Fragments,Adapters,几个带静态函数的类。
这个描述足够吗?
我有很多接口和AsyncTasks - 对于他们需要额外的东西来描述?
例如从这个例子中获取。 Android: What are the recommended configurations for Proguard?
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keep public class * extends android.app.Activity
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class mypackage.MyCallbackClass1 {
public <methods>;
}
-keep class mypackage.MyCallbackClass2 {
public <methods>;
}
-keep class mypackage.MyCallbackClass3 {
public static <methods>;
}
-keep class mypackage.MyCallbackClass4 {
public static <methods>;
}
#To keep parcelable classes (to serialize - deserialize objects to sent through Intents)
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
#Keep the R
-keepclassmembers class **.R$* {
public static <fields>;
}
谢谢!