I have found the proguard issues and answer related to com.google.gson library but not with which are related with com.google.code.gson:gson:2.3.1' library
I am using 'com.google.code.gson:gson:2.3.1'
library. without proguard its working fine but when i enable proguard the below code gives the wrong result.
Gson gson = new Gson();
UserDetails userDetails = gson.fromJson(response, UserDetails.class);
if (userDetails != null) {
Logger.appendInfoLog("gsonData" + userDetails, "gsonData");
Logger.appendInfoLog("gsonData" + userDetails.getCity(), "cityName");
}
In this code userDetails.getCity() is returning null.
What i have tried is :- To keep this library from obfuscation in proguard-rules.pro I have declared it like this
-keep class com.google.code.gson.**
But its not working, any help is appreciated