在Proguard文件中添加以下规则,防止Proguard更改参数名称:
-keepattributes Signature
-keepclassmembers class * {
*** (...);
*** (...);
}
-keepclasseswithmembers class * {
@android.webkit.JavascriptInterface ;
}
-keepclassmembers class * implements android.os.Parcelable {
public static final android.os.Parcelable$.Creator *;
}
# Exclude BCrypt classes from being obfuscated
# This is a library we're using for secure password hashing
-keep class org.mindrot.** {
*;
}
-keepclassmembers class * {
@com.google.gson.annotations.SerializedName ;
}
-keepattributes Signature,RuntimeVisibleAnnotations,AnnotationDefault
-dontobfuscate