Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kommunicate giving exception when logging in in Release Build but working good in Debug Build #79

Closed
sushant-nga opened this issue Nov 5, 2019 · 2 comments
Assignees

Comments

@sushant-nga
Copy link

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
Copy link
Contributor

reytum commented Nov 5, 2019

@sushant-nga,

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
Copy link
Author

Thanks buddy...didn't see that. Now it's working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants