i try obfuscate my code of android app with ProGuard. But after this my app give exception at running:
11-15 01:46:26.818: W/System.err(21810): java.lang.RuntimeException: Missing type parameter.
11-15 01:46:26.828: W/System.err(21810): at da.<init>(Unknown Source)
11-15 01:46:26.828: W/System.err(21810): at gc.<init>(Unknown Source)
11-15 01:46:26.828: W/System.err(21810): at fx.f(Unknown Source)
11-15 01:46:26.828: W/System.err(21810): at com.yourshows.activity.UnwatchedActivity.onResume(Unknown Source)
I checked a mapping file and found this:
com.google.gson.reflect.TypeToken -> da:
I think it’s lines in my app like:
Type mapType = new TypeToken<Map<Integer, WatchedEpisodes>>(){}.getType(); // define generic type
jsData = gson.fromJson(r, mapType);
I can not understand what conclusions should I do? Do not use variable name less then three characters or what?
UPD: answer
answer is: use this proguard.cfg
Big thanks to owner this project –> google-gson
UPD:
google/gsonhas their example of proguard configuration for android applications.see on github
They propose to use this template of configuration