我在我的项目中使用了ProGuard,但在新的Gson().toJson(Request)中它提供了错误的数据。
我得到的输出结果为:
我得到的输出结果为:
{"a":"manage","b":"689184d4418b6d975d9a8e53105d3382","c":"10","d":"76"}
取而代之
{"username":"manage","password":"689184d4418b6d975d9a8e53105d3382","value":"10","store":"76"}
我的ProGuard规则
-dontwarn okio.**
-dontwarn retrofit2.Platform$Java8
-dontwarn sun.misc.Unsafe
-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclassmembers class rx.internal.util.unsafe.** {
long producerIndex;
long consumerIndex;
}
-keepclasseswithmembers class * {
@retrofit2.http.* <methods>;
}
-keep class com.google.gson.** { *; }
-keep class com.google.inject.** { *; }
我正在使用
compile 'com.squareup.retrofit2:converter-gson:2.0.0'
请问在 Android 中,retrofit2:converter-gson 的最新推荐 ProGuard 配置是什么?