Obfuscate code error

I tried to obfuscate the application by using minify true in build.gradle

unfortunately, I got this when the call connection just connected:
java.lang.IllegalStateException: java.lang.NoSuchFieldException: fill
at j.s.a.t.a(RenderableView.java:544)
at j.s.a.j.c(GroupView.java:98)
at j.s.a.j.a(GroupView.java:81)
at j.s.a.t.b(RenderableView.java:324)
at j.s.a.w.b(SvgView.java:301)
at j.s.a.w.f(SvgView.java:252)
at j.s.a.w.onDraw(SvgView.java:104)

and the application start to force close.
How to obfuscate application with comet chat SDK properly?

1 Like

hello @hilmyas
can you please confirm if the code obfuscation workds as expected without the CometChat SDK dependency…
Also please let us know the version of the CometChat Android SDK you are using

Hi @hilmyas,

We have checked the obfuscation with CometChat Pro sample apps and we were able to obfuscate successfully.

If you are still facing this issue, please let us know if obfuscation works perfectly without CometChat SDK in your app.

My issue appears when the call accepted. I use SDK 2.0.2 and this is the logs:

at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:698)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:704)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:813)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3358)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3155)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2524)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1500)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7418)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1019)
at android.view.Choreographer.doCallbacks(Choreographer.java:830)
at android.view.Choreographer.doFrame(Choreographer.java:765)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1005)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6740)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:859)
Caused by: java.lang.NoSuchFieldException: fill
at java.lang.Class.getField(Class.java:1601)
at j.v.a.t.a(RenderableView.java:535)
… 89 more

1 Like

@hilmyas Thank you for reporting the issue. We are able to replicate the issue mentioned. We have created a Github issue at the following link:

Kindly watch the issue so that you will be notified when it’s resolved.

1 Like

OK, thank you for your support

1 Like

Hello @hilmyas,
We have identified the issue and were able to track it down to the Android SDK. We will be fixing this in the next release i.e. version 2.0.3
For now if you would like to get things up and running, you can add the below lines to the proguard file of your app:

-keep public class com.horcrux.svg.** {*;}
-keep class com.facebook.hermes.unicode.** { *; }

Adding these lines should enable you to test the calling feature in the release builds with proguard enabled. Once the version 2.0.3 is live, you can update to that version and remove the above lines from your proguard file.

Hope this helps.


OK, thank you for your support

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.