zoho / SalesIQ-Mobilisten-ReactNative

Your mobile app's ideal live chat partner. Power up your mobile App with the SalesIQ Mobilisten SDK for React-Native.
https://mobilisten.io/
8 stars 12 forks source link

[Android] Crash java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/graphics/drawable/DrawableWrapper; #94

Closed MAsadIlyasNajum closed 3 months ago

MAsadIlyasNajum commented 4 months ago

My React Native project encounters a crash on Android when opening the settings menu in the Zoho SalesIQ chat. The issue does not occur on iOS.

Environment:

"react-native": "^0.74.3",
"react-native-zohosalesiq-mobilisten": "^9.3.1",

React Native Version: ^0.74.3 Zoho SalesIQ Mobilisten Version: ^9.3.1

Steps to Reproduce:

Observed Behavior:

Expected Behavior:

The Android app should not crash and should display the settings menu properly, similar to the iOS app.

Crash: E FATAL EXCEPTION: main Process: com.wego.shopcash.android, PID: 16386 java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/graphics/drawable/DrawableWrapper; at androidx.appcompat.widget.MenuPopupWindow.createDropDownListView(MenuPopupWindow.java:80) at androidx.appcompat.widget.ListPopupWindow.buildDropDown(ListPopupWindow.java:1178) at androidx.appcompat.widget.ListPopupWindow.show(ListPopupWindow.java:663) at androidx.appcompat.view.menu.StandardMenuPopup.tryShow(StandardMenuPopup.java:181) at androidx.appcompat.view.menu.StandardMenuPopup.show(StandardMenuPopup.java:208) at androidx.appcompat.view.menu.MenuPopupHelper.showPopup(MenuPopupHelper.java:296) at androidx.appcompat.view.menu.MenuPopupHelper.tryShow(MenuPopupHelper.java:182) at androidx.appcompat.widget.ActionMenuPresenter$OpenOverflowRunnable.run(ActionMenuPresenter.java:792) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.appcompat.graphics.drawable.DrawableWrapper" on path: DexPathList[[zip file "/data/app/~~D-T0k6NbwgYRJbWQVkYMDA==/com.wego.shopcash.android-FOX-YNqYB5xagasxfT4iHw==/base.apk"],nativeLibraryDirectories=[/data/app/~~D-T0k6NbwgYRJbWQVkYMDA==/com.wego.shopcash.android-FOX-YNqYB5xagasxfT4iHw==/lib/arm64, /data/app/~~D-T0k6NbwgYRJbWQVkYMDA==/com.wego.shopcash.android-FOX-YNqYB5xagasxfT4iHw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at androidx.appcompat.widget.MenuPopupWindow.createDropDownListView(MenuPopupWindow.java:80)  at androidx.appcompat.widget.ListPopupWindow.buildDropDown(ListPopupWindow.java:1178)  at androidx.appcompat.widget.ListPopupWindow.show(ListPopupWindow.java:663)  at androidx.appcompat.view.menu.StandardMenuPopup.tryShow(StandardMenuPopup.java:181)  at androidx.appcompat.view.menu.StandardMenuPopup.show(StandardMenuPopup.java:208)  at androidx.appcompat.view.menu.MenuPopupHelper.showPopup(MenuPopupHelper.java:296)  at androidx.appcompat.view.menu.MenuPopupHelper.tryShow(MenuPopupHelper.java:182)  at androidx.appcompat.widget.ActionMenuPresenter$OpenOverflowRunnable.run(ActionMenuPresenter.java:792)  at android.os.Handler.handleCallback(Handler.java:958)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loopOnce(Looper.java:205)  at android.os.Looper.loop(Looper.java:294)  at android.app.ActivityThread.main(ActivityThread.java:8177)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)  2024-07-31 15:23:41.247 16386-16386 WebEngage com.wego.shopcash.android E App has crashed java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/graphics/drawable/DrawableWrapper; Screenshot_20240731_152312

bhahirathan-mb-11956 commented 3 months ago

Hi @najumasad,

Thank you for reaching out to us. This error may occur when the appcompat dependency is used with a strict version.

implementation ('androidx.appcompat:appcompat:${your_version}') {
    version {
        strictly '${your_version}'
    }
}

The above snippet will make the appcompat library strictly use your_version, but our latest SDK version points to the version 1.6.1. Since our SDK is trying to open a class or function that is present only in 1.6.1 but not in your_version the app is crashing.

So, removing your dependency or the strictly function will make this work properly. If this issue persists, please write us at (support@zohosalesiq.com). We will be happy to help.

Best regards, Bhahirathan M Zoho SalesIQ.

bhahirathan-mb-11956 commented 3 months ago

Hi @najumasad ,

As there is no recent activity from your side, we are closing this issue. You can reopen this again anytime. Meanwhile, please check out our latest version.

Please feel free to write back to us at (support@zohosalesiq.com) if the issue persists.

Best regards, Bhahirathan M Zoho SalesIQ.