Kommunicate giving exception when logging in in Release Build but working good in Debug Build
Closed this issue · 2 comments
sushant-nga commented
W/System.err: java.lang.IllegalArgumentException: class c.b.g.a declares multiple JSON fields named a
W/System.err: at com.google.gson.b.a.i.a(ReflectiveTypeAdapterFactory.java:172)
W/System.err: at com.google.gson.b.a.i.a(ReflectiveTypeAdapterFactory.java:102)
W/System.err: at com.google.gson.Gson.a(Gson.java:458)
W/System.err: at com.google.gson.Gson.a(Gson.java:696)
W/System.err: at com.google.gson.Gson.a(Gson.java:683)
W/System.err: at com.google.gson.Gson.b(Gson.java:638)
W/System.err: at com.google.gson.Gson.b(Gson.java:618)
W/System.err: at com.applozic.mobicomkit.api.a.a.a.a(RegisterUserClientService.java:100)
W/System.err: at c.b.a.i.a(KmUserLoginTask.java:62)
W/System.err: at c.b.a.i.doInBackground(KmUserLoginTask.java:24)
W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:334)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:246)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/System.err: at java.lang.Thread.run(Thread.java:764)
reytum commented
Looks like you are using proguard and have not added the proguard configuration for kommunicate.
Can you add the below configurations in your proguard-rules.pro file and try?
#keep JSON classes
-keepclassmembernames class * extends com.applozic.mobicommons.json.JsonMarker {
!static !transient <fields>;
}
-keepclassmembernames class * extends com.applozic.mobicommons.json.JsonParcelableMarker {
!static !transient <fields>;
}
#GSON Config
-keepattributes Signature
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.examples.android.model.** { *; }
-keep class org.eclipse.paho.client.mqttv3.logging.JSR47Logger { *; }
-keep class android.support.** { *; }
-keep interface android.support.** { *; }
-dontwarn android.support.v4.**
-keep public class com.google.android.gms.* { public *; }
-dontwarn com.google.android.gms.**
-keep class com.google.gson.** { *; }
sushant-nga commented
Thanks buddy...didn't see that. Now it's working fine.