Implementing Proguard in Android throws error Gson

By : Munchoo

I am trying to implement Proguard for my Android project. Am using Android Studio for doing the same. But finding lot of difficulties while implementation. Is there a good tutorial to overcome all the issues. In the below code which I have used got an exception like cannot be cast. Can anyone help me to get rid of this issue.

In my proguard-rules.txt I have used the below lines too. But it dint resolve my issue

-keep class**{*;}

public class Home_CityDet implements Serializable{

private static final long serialVersionUID = 1L;
public String key;
public String value ;   

java.lang.ClassCastException: cannot be cast to webservices.responses.Home_CityDet
By : Munchoo


I had to add to the progaurd configuration:

-keepattributes Signature
-keepattributes *Annotation*
-keep class Home_CityDet  {

and the error magically disappeared

By : nont

This video can help you solving your question :)
By: admin