GSON混淆後執行錯誤

You need to add these lines to your proguard so that gson class is kept while signing your app.android

##---------------Begin: proguard configuration for Gson  ----------  app

# Gson uses generic type information stored in a class file when working with fields. Proguard  google

# removes such information by default, so configure it to keep all of it.  spa

-keepattributes Signature  orm

# For using GSON @Expose annotation  ci

-keepattributes *Annotation*  rem

# Gson specific classes  it

-keep class sun.misc.Unsafe { *; }  io

#-keep class com.google.gson.stream.** { *; }  form

# Application classes that will be serialized/deserialized over Gson  

-keep class com.google.gson.examples.android.model.** { *; }  

##---------------End: proguard configuration for Gson  ----------  

相關文章
相關標籤/搜索