crisp-im / crisp-sdk-android

:package: Crisp Android SDK, add a chat in any Android app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/android-sdk/
Other
56 stars 17 forks source link

Android RELEASE build not working #46

Closed FrantisekGazo closed 3 years ago

FrantisekGazo commented 3 years ago

I get this error every time I try to open chat when I create a release build of our app. This happens only on release build.

E/AndroidRuntime(14492): FATAL EXCEPTION: main
E/AndroidRuntime(14492): Process: com.ventrata.intercom.plugin.demo, PID: 14492
E/AndroidRuntime(14492): java.lang.AssertionError: java.lang.NoSuchFieldException: DEFAULT
E/AndroidRuntime(14492):    at c.a.c.y.n.n$k0.<init>()
E/AndroidRuntime(14492):    at c.a.c.y.n.n$w.a()
E/AndroidRuntime(14492):    at c.a.c.f.a()
E/AndroidRuntime(14492):    at c.a.c.y.n.i.a()
E/AndroidRuntime(14492):    at c.a.c.y.n.i.a()
E/AndroidRuntime(14492):    at c.a.c.y.n.i.a()
E/AndroidRuntime(14492):    at c.a.c.f.a()
E/AndroidRuntime(14492):    at c.a.c.y.n.i.a()
E/AndroidRuntime(14492):    at c.a.c.y.n.i.a()
E/AndroidRuntime(14492):    at c.a.c.y.n.i.a()
E/AndroidRuntime(14492):    at c.a.c.f.a()
E/AndroidRuntime(14492):    at i.x.a.a.a()
E/AndroidRuntime(14492):    at i.s.a()
E/AndroidRuntime(14492):    at i.s.b()
E/AndroidRuntime(14492):    at i.i.a()
E/AndroidRuntime(14492):    at i.i.a()
E/AndroidRuntime(14492):    at i.t.a()
E/AndroidRuntime(14492):    at i.s.a()
E/AndroidRuntime(14492):    at i.s$a.invoke()
E/AndroidRuntime(14492):    at java.lang.reflect.Proxy.invoke(Proxy.java:813)
E/AndroidRuntime(14492):    at $Proxy0.a(Unknown Source)
E/AndroidRuntime(14492):    at im.crisp.client.j.d.b0.d.a.b()
E/AndroidRuntime(14492):    at im.crisp.client.j.d.b0.d.a.a()
E/AndroidRuntime(14492):    at im.crisp.client.j.d.b0.d.a$a.a()
E/AndroidRuntime(14492):    at i.g$b$a$a.run()
E/AndroidRuntime(14492):    at android.os.Handler.handleCallback(Handler.java:751)
E/AndroidRuntime(14492):    at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(14492):    at android.os.Looper.loop(Looper.java:154)
E/AndroidRuntime(14492):    at android.app.ActivityThread.main(ActivityThread.java:6121)
E/AndroidRuntime(14492):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14492):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
E/AndroidRuntime(14492):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
E/AndroidRuntime(14492): Caused by: java.lang.NoSuchFieldException: DEFAULT
E/AndroidRuntime(14492):    at java.lang.Class.getField(Class.java:1549)
E/AndroidRuntime(14492):    ... 32 more
FrantisekGazo commented 3 years ago

@baptistejamin can you help with this?

Do I need some proguard rules or somehing? If so please include them in your github README

baptistejamin commented 3 years ago

Hello!

Could you please try a build without proguard?

FrantisekGazo commented 3 years ago

after adding -keep class im.crisp.** { *; } proguard rules the release build works

FrantisekGazo commented 3 years ago

I now tried disabling proguard and it also works, but that's not a solution. you should include proguard rules in your repo

baptistejamin commented 3 years ago

Ok, wildcarding Crisp will do the job then

baptistejamin commented 3 years ago

We'll add the rules

FrantisekGazo commented 3 years ago

thanks