Rowno
unread,Oct 27, 2010, 8:35:13 AM10/27/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-gson
Hi, I'm currently working on an Android app that uses Gson to parse
JSON data that's returned from a server. It works fine, but when I
used ProGuard to obfuscate the app, Gson started returning null for
the List attribute in the object returned from Gson().fromJson(). Gson
isn't throwing any exceptions so I have no idea what's going wrong and
the rest of the app is working fine. Here's my ProGuard config file:
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/
*
-dump class_files.txt
-printseeds seeds.txt
-printusage unused.txt
-printmapping mapping.txt
-keepattributes
SourceFile,LineNumberTable,Exceptions,Signature,Enclosing
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context,
android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet,
int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}